Commit 68df2ed5 authored by Paul Moore's avatar Paul Moore
Browse files

audit: use the proper gfp flags in the audit_log_nfcfg() calls



Commit 14224039 ("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: 14224039 ("audit: add gfp parameter to audit_log_nfcfg")
Reported-by: default avatarJones Desougi <jones.desougi+netfilter@gmail.com>
Reviewed-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 9fc54012
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -5953,7 +5953,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
				goto cont;

			if (reset) {
				char *buf = kasprintf(GFP_KERNEL,
				char *buf = kasprintf(GFP_ATOMIC,
						      "%s:%llu;?:0",
						      table->name,
						      table->handle);
@@ -5962,7 +5962,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
						family,
						obj->handle,
						AUDIT_NFT_OP_OBJ_RESET,
						GFP_KERNEL);
						GFP_ATOMIC);
				kfree(buf);
			}

@@ -6084,7 +6084,7 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,
				family,
				obj->handle,
				AUDIT_NFT_OP_OBJ_RESET,
				GFP_KERNEL);
				GFP_ATOMIC);
		kfree(buf);
	}

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

	if (!report &&