Patch "net: don't dump Tx and uninitialized NAPIs" has been added to the 6.12-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: don't dump Tx and uninitialized NAPIs

to the 6.12-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-don-t-dump-tx-and-uninitialized-napis.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 3552059d7d839be6a98942ae86eafd41f57c315e
Author: Jakub Kicinski <kuba@xxxxxxxxxx>
Date:   Fri Jan 3 10:32:07 2025 -0800

    net: don't dump Tx and uninitialized NAPIs
    
    [ Upstream commit fd48f071a3d6d51e737e953bb43fe69785cf59a9 ]
    
    We use NAPI ID as the key for continuing dumps. We also depend
    on the NAPIs being sorted by ID within the driver list. Tx NAPIs
    (which don't have an ID assigned) break this expectation, it's
    not currently possible to dump them reliably. Since Tx NAPIs
    are relatively rare, and can't be used in doit (GET or SET)
    hide them from the dump API as well.
    
    Fixes: 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi")
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Link: https://patch.msgid.link/20250103183207.1216004-1-kuba@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
index d58270b48cb2..c639acb5abfd 100644
--- a/net/core/netdev-genl.c
+++ b/net/core/netdev-genl.c
@@ -173,8 +173,7 @@ netdev_nl_napi_fill_one(struct sk_buff *rsp, struct napi_struct *napi,
 	if (!hdr)
 		return -EMSGSIZE;
 
-	if (napi->napi_id >= MIN_NAPI_ID &&
-	    nla_put_u32(rsp, NETDEV_A_NAPI_ID, napi->napi_id))
+	if (nla_put_u32(rsp, NETDEV_A_NAPI_ID, napi->napi_id))
 		goto nla_put_failure;
 
 	if (nla_put_u32(rsp, NETDEV_A_NAPI_IFINDEX, napi->dev->ifindex))
@@ -254,6 +253,8 @@ netdev_nl_napi_dump_one(struct net_device *netdev, struct sk_buff *rsp,
 		return err;
 
 	list_for_each_entry(napi, &netdev->napi_list, dev_list) {
+		if (napi->napi_id < MIN_NAPI_ID)
+			continue;
 		if (ctx->napi_id && napi->napi_id >= ctx->napi_id)
 			continue;
 




[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