Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E10C63A6411 for ; Tue, 12 May 2026 09:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778578270; cv=none; b=m96a0JxwC4cubUXX2/x65rVGuXsa9JNMRPb4Ry0pIVl8Ltr/qu6FjcyBgeRn2fN5MMMLth6fMJ4DqClkSuCCZUAc9jg64i46WjjVoDX673NV3vyyF9uIIve13ioMNNWdkYtL0Qwuj7TJdU2Ai7mQPUcNebkes1/NqwWsGJB1iWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778578270; c=relaxed/simple; bh=ZAyIWr6p6Lb02Xg0O/JRK7iNnMHkl31gnQ6U5oig1sA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l2zjfk7mUa8+Dh3w6d1GBR4cdlTzJTJcvk1wXXoF4tYL9aryri3o8hTF01IHijNfRT7VHXCoL0FbL60TsYF1X8uR2cr56M7ZJgMyRauX17D0/4c3xHbA8xBAg7NGcgsIi17nb9C8AAB+lYNX/8u7BeZsc9EMjD8Z6h/zLgOK8js= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id A907060D57; Tue, 12 May 2026 11:31:00 +0200 (CEST) From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nf] netfilter: nft_inner: release local_lock before re-enabling softirqs Date: Tue, 12 May 2026 11:30:49 +0200 Message-ID: <20260512093052.24326-1-fw@strlen.de> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Quoting sashiko: In the error path, local_bh_enable() is called before local_unlock_nested_bh(). Fixes: ba36fada9ab4 ("netfilter: nft_inner: Use nested-BH locking for nft_pcpu_tun_ctx") Signed-off-by: Florian Westphal --- net/netfilter/nft_inner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nft_inner.c b/net/netfilter/nft_inner.c index 03ffb1159fc1..85164369b924 100644 --- a/net/netfilter/nft_inner.c +++ b/net/netfilter/nft_inner.c @@ -247,8 +247,8 @@ static bool nft_inner_restore_tun_ctx(const struct nft_pktinfo *pkt, local_lock_nested_bh(&nft_pcpu_tun_ctx.bh_lock); this_cpu_tun_ctx = this_cpu_ptr(&nft_pcpu_tun_ctx.ctx); if (this_cpu_tun_ctx->cookie != (unsigned long)pkt->skb) { - local_bh_enable(); local_unlock_nested_bh(&nft_pcpu_tun_ctx.bh_lock); + local_bh_enable(); return false; } *tun_ctx = *this_cpu_tun_ctx; -- 2.53.0