Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796122764; b=IrxCCAd5FSD3aO7c+We+7/WA4Ffzz9GZ7WdUP8eQIIe6PnNVGweby7CyY31xjcEQMz4a VJo3hzGLCZ5oRPG0tzKCnfNNGojpCWT2yH0fE5s5VpiSdcs6EqJBCWNzrhLwmKIwFLK8G XrKxojB8l6b/VLilLUseFeNXO/BVuuAk2lXR6/EleoIOaqkPgz0s82XLdviGu5PJN8jVD sD1/byxkm1pzmCFtDZaxPyC78nyGLubicKwYMb6xos7LrK0UwEUL3knmy89OyrcbDMsEc hY+ZG9GV6QhhQqxLPQWU/FEH2bFIfWZcKpO9/Nksok90J0zwafuWF9u4XbwM8rVYP8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122764; h=DMARC-Filter:DKIM-Signature:Received:From:To:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spam-Status:X-Spam-Checker-Version; bh=flIz/U1eJu58pLoeHsbeSTqM9lhtEjtncSwKN0gxbM4=; b=nfZUSgLF/Tgh1GRqNaFJp53lU8HoBCuKn14Wyt/w2v5iNDnaAPuQ8Rw9c1aeP1NJLhXQ orUVAmj1sDwKV3ycFv19+2nNoT1QkG+KP5pWhUOZP8v+/RrpCXqLEjLHQ7P6onTYberND bLyhWN1pgG91gmhWtvS5CEAAUl9zeAGX8g2hpFPgfQ3q2MBBxWDfWUO4adpf4pNgoJoJq Z89TgaJdbELBDnUJuSOWPbm1uOvl2rczCGf60UcbjsHyGr0Ux2eUG1AigOb+sCbJXJojD k0NsN4Zei3/+sJ6erlvBRwFzhH920kY6zJ6ZWZ9FEE4K96/YNU45lPNP1pnIA6ASoiw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=uqruQZXk; arc=none smtp.remote-ip=217.70.190.124 Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82C40606A334 for ; Tue, 1 Dec 2026 10:59:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 82C40606A334 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=uqruQZXk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org; s=2025; t=1796122761; bh=flIz/U1eJu58pLoeHsbeSTqM9lhtEjtncSwKN0gxbM4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uqruQZXkmiPHIZ5VT+0im7UA6PiiZR0q/f6mFOeSQ8N/HKKfE+p0ZA+gV0EZ/lfcA ISVVhEVsmIm3k+VbmAEpr7z2SxRRoRNsitSj1rj6umcwaBym8211STssCCthWoselF mMyfhpkywY36tWTColLdZC0fWyC3NgmeoqOSrCuM3j+HecOiAAtu6LVoJZRRzlM138 yjIKbzPl3Osul+gFWjJ07b23ZW8nzr/wY3hDVrPdcbyhmSXETcflgVtRp/VYlDeXDa b6PcpFbsBq8NdnKvZ9+rXoeqi/jHFGstjhEc7RmbrbxLW0jPjHLw5doy75boILheea h12v+UaF5aLfQ== Received: from localhost.localdomain (mail-agni [217.70.190.124]) by mail.netfilter.org (Postfix) with ESMTPSA id B89E860060 for ; Tue, 1 Dec 2026 11:59:21 +0100 (CET) From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH nf,v5 5/5] netfilter: nf_tables: flush pending destroy work on new flowtable Date: Tue, 1 Dec 2026 11:59:12 +0100 Message-ID: <20261201105912.1111000-5-pablo@netfilter.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261201105912.1111000-1-pablo@netfilter.org> References: <20261201105912.1111000-1-pablo@netfilter.org> X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If userspace deletes a hardware offloaded flowtable and then adds a new one on the same device in the next transaction (classic ruleset reload). The flow_block BIND command from nf_tables_newflowtable() can reach the driver while the old block_cb is pending to be unregistered via destroy worker. Force a flush of pending work in this case. Fixes: 13210fc63f35 ("netfilter: nf_tables: imbalance in flowtable binding") Signed-off-by: Pablo Neira Ayuso --- v5: new in this series net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index f856b1daff37..d5a3911fea5b 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -9335,6 +9335,8 @@ static int nf_tables_newflowtable(struct sk_buff *skb, err = -EOPNOTSUPP; goto err3; } + if (flowtable->data.flags & NFT_FLOWTABLE_HW_OFFLOAD) + nf_tables_trans_destroy_flush_work(net); } write_pnet(&flowtable->data.net, net); -- 2.47.3