Unverified Commit c9155daa authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10179 [22.03-LTS-SP3]net:openvswitch: Before calling ovs_vport_send, check...

!10179 [22.03-LTS-SP3]net:openvswitch: Before calling ovs_vport_send, check the link status of vport->dev

Merge Pull Request from: @shiguangyin 
 
In some high-concurrency scenarios, the link status of the network device corresponding to ovs (vport->dev) is disconnected, but the device (vport->dev) has not been unregistered. In this case, it is unreasonable to invoke ovs_vport_send to send SKBS.
Before calling ovs_vport_send, check the link status of vport->dev.
Refer to upstream community links:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc5&id=066b86787fa3d97b7aefb5ac0a99a22dad2d15f8 
 
Link:https://gitee.com/openeuler/kernel/pulls/10179

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parents 9891f817 3f9f01a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,
{
	struct vport *vport = ovs_vport_rcu(dp, out_port);

	if (likely(vport)) {
	if (likely(vport && netif_carrier_ok(vport->dev))) {
		u16 mru = OVS_CB(skb)->mru;
		u32 cutlen = OVS_CB(skb)->cutlen;