Skip to content

Commit 68df2ed

Browse files
committed
audit: use the proper gfp flags in the audit_log_nfcfg() calls
Commit 1422403 ("audit: add gfp parameter to audit_log_nfcfg") incorrectly passed gfp flags to audit_log_nfcfg() which were not consistent with the calling function, this commit fixes that. Fixes: 1422403 ("audit: add gfp parameter to audit_log_nfcfg") Reported-by: Jones Desougi <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 9fc5401 commit 68df2ed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5953,7 +5953,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
59535953
goto cont;
59545954

59555955
if (reset) {
5956-
char *buf = kasprintf(GFP_KERNEL,
5956+
char *buf = kasprintf(GFP_ATOMIC,
59575957
"%s:%llu;?:0",
59585958
table->name,
59595959
table->handle);
@@ -5962,7 +5962,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
59625962
family,
59635963
obj->handle,
59645964
AUDIT_NFT_OP_OBJ_RESET,
5965-
GFP_KERNEL);
5965+
GFP_ATOMIC);
59665966
kfree(buf);
59675967
}
59685968

@@ -6084,7 +6084,7 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,
60846084
family,
60856085
obj->handle,
60866086
AUDIT_NFT_OP_OBJ_RESET,
6087-
GFP_KERNEL);
6087+
GFP_ATOMIC);
60886088
kfree(buf);
60896089
}
60906090

@@ -6172,7 +6172,7 @@ void nft_obj_notify(struct net *net, const struct nft_table *table,
61726172
event == NFT_MSG_NEWOBJ ?
61736173
AUDIT_NFT_OP_OBJ_REGISTER :
61746174
AUDIT_NFT_OP_OBJ_UNREGISTER,
6175-
GFP_KERNEL);
6175+
gfp);
61766176
kfree(buf);
61776177

61786178
if (!report &&

0 commit comments

Comments
 (0)