From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7111A1D302 for ; Tue, 25 Jul 2023 11:25:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E53DEC433C8; Tue, 25 Jul 2023 11:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690284341; bh=bgz7MPIBschHpXAj1tgAM7YjvcPm+uprOymkQr0Tx1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lftk5sN89V2l2nWagU2vRwqXEDyP2UemOR5r3NyD3kFMIuPSd54pVFbXP+AAPEcp+ d8gbNwdJPCUFNN8HpGdMJIZ7Vu+aMAZk0L7SD8xoxt9gzDNWprhWQLCOC1fTesZXN6 6oQ4Qw0DpuBiOTGtazFTocAyP6NdLsxa05FlUCIY= From: Greg Kroah-Hartman To: stable@vger.kernel.org, netfilter-devel@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 5.10 322/509] netfilter: nf_tables: fix scheduling-while-atomic splat Date: Tue, 25 Jul 2023 12:44:21 +0200 Message-ID: <20230725104608.438348759@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725104553.588743331@linuxfoundation.org> References: <20230725104553.588743331@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Florian Westphal [ Upstream commit 2024439bd5ceb145eeeb428b2a59e9b905153ac3 ] nf_tables_check_loops() can be called from rhashtable list walk so cond_resched() cannot be used here. Fixes: 81ea01066741 ("netfilter: nf_tables: add rescheduling points during loop detection walks") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_tables_api.c | 4 ---- 1 file changed, 4 deletions(-) --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -8684,13 +8684,9 @@ static int nf_tables_check_loops(const s break; } } - - cond_resched(); } list_for_each_entry(set, &ctx->table->sets, list) { - cond_resched(); - if (!nft_is_active_next(ctx->net, set)) continue; if (!(set->flags & NFT_SET_MAP) ||