Patch "netfilter: nf_tables: Drop pointless memset when dumping rules" has been added to the 6.1-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

    netfilter: nf_tables: Drop pointless memset when dumping rules

to the 6.1-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:
     netfilter-nf_tables-drop-pointless-memset-when-dumpi.patch
and it can be found in the queue-6.1 subdirectory.

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



commit a4b6df62013d92bacd282c935a4c31bbb54c4099
Author: Phil Sutter <phil@xxxxxx>
Date:   Fri Sep 29 21:19:19 2023 +0200

    netfilter: nf_tables: Drop pointless memset when dumping rules
    
    [ Upstream commit 30fa41a0f6df4c85790cc6499ddc4a926a113bfa ]
    
    None of the dump callbacks uses netlink_callback::args beyond the first
    element, no need to zero the data.
    
    Fixes: 96518518cc41 ("netfilter: add nftables")
    Signed-off-by: Phil Sutter <phil@xxxxxx>
    Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 5c783199b4999..d6d59e36d17a7 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3279,10 +3279,6 @@ static int __nf_tables_dump_rules(struct sk_buff *skb,
 			goto cont_skip;
 		if (*idx < s_idx)
 			goto cont;
-		if (*idx > s_idx) {
-			memset(&cb->args[1], 0,
-					sizeof(cb->args) - sizeof(cb->args[0]));
-		}
 		if (prule)
 			handle = prule->handle;
 		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