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 E626222F74D; Sun, 7 Sep 2025 20:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275716; cv=none; b=Rnz8ZTvP+bpWbzel5TIOf68jq2sYTWniC0YsvolNkwRLPxcB1hOb+b2HQ6j80J2nCJNGeWqzMCcS0ahkJC9AAbVDt4Lrcd5c/jXrNb9Y4+uqPF0QrsmIaQ+LGoLPZJuGVX+6t3gVzK/kmNseRCt7Lq+woMQMtgx/8AZa5ZoSwvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275716; c=relaxed/simple; bh=aJtuPWigQQnqBShgALMej+e2zcjv3oHr7DLOr4hgDj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FhgfKpL+1frXR7+hR1qjlBd3YeuP0U06XKJ7gcivvwsNj7JsGlQPv74ixXoIG/aZy1qLzu4FwVet6we+KPBtbr98MPAMmgPf8QWaWY/B9hziBtGtGGJ2Y+qtd1bP3uqy6Wo9+uavSo1uxvGUweY/czeiu/nUj4dqcp97cuE2Dis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eiIeJgWK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eiIeJgWK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D6C5C4CEF0; Sun, 7 Sep 2025 20:08:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757275715; bh=aJtuPWigQQnqBShgALMej+e2zcjv3oHr7DLOr4hgDj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiIeJgWKHedZt4vRr2iSKnd3Ehormcm33OFZgFQM5zSsISXdl6ZKpddIyNJbh0o0e UhYR8eXCpbdaOZnTDDboSO70U+ufYgzJSPoxV55VY1IruGL/AB2HCOHJhmtx9msxIh XRzH45sKesTDifSp7m7cHRx5Vsty6KW3h8oWK+n0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe Leroy , Phil Sutter , Florian Westphal , Sasha Levin Subject: [PATCH 5.10 05/52] netfilter: conntrack: helper: Replace -EEXIST by -EBUSY Date: Sun, 7 Sep 2025 21:57:25 +0200 Message-ID: <20250907195602.127198332@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250907195601.957051083@linuxfoundation.org> References: <20250907195601.957051083@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Phil Sutter [ Upstream commit 54416fd76770bd04fc3c501810e8d673550bab26 ] The helper registration return value is passed-through by module_init callbacks which modprobe confuses with the harmless -EEXIST returned when trying to load an already loaded module. Make sure modprobe fails so users notice their helper has not been registered and won't work. Suggested-by: Christophe Leroy Fixes: 12f7a505331e ("netfilter: add user-space connection tracking helper infrastructure") Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nf_conntrack_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index 32cc91f5ba99f..89174c91053ed 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c @@ -417,7 +417,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me) (cur->tuple.src.l3num == NFPROTO_UNSPEC || cur->tuple.src.l3num == me->tuple.src.l3num) && cur->tuple.dst.protonum == me->tuple.dst.protonum) { - ret = -EEXIST; + ret = -EBUSY; goto out; } } @@ -428,7 +428,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me) hlist_for_each_entry(cur, &nf_ct_helper_hash[h], hnode) { if (nf_ct_tuple_src_mask_cmp(&cur->tuple, &me->tuple, &mask)) { - ret = -EEXIST; + ret = -EBUSY; goto out; } } -- 2.50.1