Patch "net/sched: act_mirred: Add carrier check" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/sched: act_mirred: Add carrier check

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-sched-act_mirred-add-carrier-check.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1d4cde8a39076d95fb5375e4f1de724e731bf716
Author: Victor Nogueira <victor@xxxxxxxxxxxx>
Date:   Wed Apr 26 15:19:40 2023 +0000

    net/sched: act_mirred: Add carrier check
    
    [ Upstream commit 526f28bd0fbdc699cda31426928802650c1528e5 ]
    
    There are cases where the device is adminstratively UP, but operationally
    down. For example, we have a physical device (Nvidia ConnectX-6 Dx, 25Gbps)
    who's cable was pulled out, here is its ip link output:
    
    5: ens2f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
        link/ether b8:ce:f6:4b:68:35 brd ff:ff:ff:ff:ff:ff
        altname enp179s0f1np1
    
    As you can see, it's administratively UP but operationally down.
    In this case, sending a packet to this port caused a nasty kernel hang (so
    nasty that we were unable to capture it). Aborting a transmit based on
    operational status (in addition to administrative status) fixes the issue.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Acked-by: Jamal Hadi Salim <jhs@xxxxxxxxxxxx>
    Signed-off-by: Victor Nogueira <victor@xxxxxxxxxxxx>
    v1->v2: Add fixes tag
    v2->v3: Remove blank line between tags + add change log, suggested by Leon
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index dcfaa4f9c7c5b..0a032c4d26b86 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -181,7 +181,7 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
 		goto out;
 	}
 
-	if (unlikely(!(dev->flags & IFF_UP))) {
+	if (unlikely(!(dev->flags & IFF_UP)) || !netif_carrier_ok(dev)) {
 		net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
 				       dev->name);
 		goto out;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux