Patch "rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink()." has been added to the 5.15-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

    rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().

to the 5.15-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:
     rtnetlink-don-t-ignore-ifla_target_netnsid-when-ifna.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 8e70b6983c7f1a37dcea4c7aada8555f04799286
Author: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
Date:   Fri Jul 26 17:19:53 2024 -0700

    rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
    
    [ Upstream commit 9415d375d8520e0ed55f0c0b058928da9a5b5b3d ]
    
    The cited commit accidentally replaced tgt_net with net in rtnl_dellink().
    
    As a result, IFLA_TARGET_NETNSID is ignored if the interface is specified
    with IFLA_IFNAME or IFLA_ALT_IFNAME.
    
    Let's pass tgt_net to rtnl_dev_get().
    
    Fixes: cc6090e985d7 ("net: rtnetlink: introduce helper to get net_device instance by ifname")
    Signed-off-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
    Reviewed-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 4284406740932..eca7f6f4a52f5 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3115,7 +3115,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh,
 	if (ifm->ifi_index > 0)
 		dev = __dev_get_by_index(tgt_net, ifm->ifi_index);
 	else if (tb[IFLA_IFNAME] || tb[IFLA_ALT_IFNAME])
-		dev = rtnl_dev_get(net, tb);
+		dev = rtnl_dev_get(tgt_net, tb);
 	else if (tb[IFLA_GROUP])
 		err = rtnl_group_dellink(tgt_net, nla_get_u32(tb[IFLA_GROUP]));
 	else




[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