FAILED: patch "[PATCH] netfilter: nf_tables: discard table flag update with pending" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x 1bc83a019bbe268be3526406245ec28c2458a518
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024040515-cornbread-bottling-0651@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1bc83a019bbe268be3526406245ec28c2458a518 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <[email protected]>
Date: Wed, 3 Apr 2024 19:35:30 +0200
Subject: [PATCH] netfilter: nf_tables: discard table flag update with pending
basechain deletion
Hook unregistration is deferred to the commit phase, same occurs with hook updates triggered by the table dormant flag. When both commands are combined, this results in deleting a basechain while leaving its hook still registered in the core.
net/netfilter/nf_tables_api.c +5 -4
@@ -1209,10 +1209,11 @@ static bool nft_table_pending_update(const struct nft_ctx *ctx)return true;list_for_each_entry (trans, &nft_net->commit_list, list) { -if ((trans->msg_type ==NFT_MSG_NEWCHAIN || - trans->msg_type ==NFT_MSG_DELCHAIN ) && - trans->ctx.table == ctx->table && -nft_trans_chain_update (trans)) +if (trans->ctx.table == ctx->table && + ((trans->msg_type ==NFT_MSG_NEWCHAIN && +nft_trans_chain_update (trans)) || + (trans->msg_type ==NFT_MSG_DELCHAIN && +nft_is_base_chain (trans->ctx.chain))))return true; }