Patch "netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT" 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: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT

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-modify-nla_memdup-s-flag-to-gfp_.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 e1eba4e7da7973fb4d4f26d395d4499fc883703f
Author: Chen Aotian <chenaotian2@xxxxxxx>
Date:   Thu Apr 6 12:01:51 2023 +0800

    netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT
    
    [ Upstream commit af0acf22aea359e04412237d68787401f96bb583 ]
    
    For memory alloc that store user data from nla[NFTA_OBJ_USERDATA],
    use GFP_KERNEL_ACCOUNT is more suitable.
    
    Fixes: 33758c891479 ("memcg: enable accounting for nft objects")
    Signed-off-by: Chen Aotian <chenaotian2@xxxxxxx>
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 1a9d759d0a026..ee052a5874fc3 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -6980,7 +6980,7 @@ static int nf_tables_newobj(struct sk_buff *skb, const struct nfnl_info *info,
 	}
 
 	if (nla[NFTA_OBJ_USERDATA]) {
-		obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL);
+		obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL_ACCOUNT);
 		if (obj->udata == NULL)
 			goto err_userdata;
 



[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