Article View: linux.kernel.netdev
Article #24981Re: [PATCH net] net/smc: fix sock reference leak on abort_work cancel
From: Mahanta Jambigi
Date: Tue, 01 Dec 2026 05:48
Date: Tue, 01 Dec 2026 05:48
31 lines
13718 bytes
13718 bytes
On 24/11/26 1:13 pm, netdev-bot+sinfo@kernel.org wrote: > Hi! > > This is an automated message. This series looks like a fix, but its > commit messages seem to be missing some information: > > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. Manual code inspection while reviewing the CDC validation and tear-down paths. No report, no reproducer, no tool. > > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by LLM and not proven at runtime). If it was triggered > please include the symptoms, like the stack trace or kernel messages. Not triggered at runtime, and there is no stack trace to include: the failure is silent, the socket is simply never freed. smc_cdc_msg_validate() holds a reference only when queue_work() succeeds, and smc_conn_abort_work() is the only place that drops it. When smc_conn_free() cancels the work while it is still pending, cancel_work_sync() removes it, the handler never runs and the reference is lost. Once the work is running, cancel_work_sync() waits for it and returns false, so the leak needs the queued-but-not-started window, for example a close racing with a failed CDC validation.
Technical Details
Message-ID:
<f515dff5-1d88-441b-972c-4b4f0cde0f89@linux.ibm.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374714-linux-kernel-netdev=dewy.ruReferences:
<20261124073602.2341904-1-mjambigi@linux.ibm.com> <179550622759.3294.11500155506194750683@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374714-linux-kernel-netdev=dewy.ru
From: mjambigi@linux.ibm.com (Mahanta Jambigi)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net/smc: fix sock reference leak on abort_work cancel
Date: Tue, 1 Dec 2026 11:18:05 +0530
Organization: Usenet Network
Message-ID: <f515dff5-1d88-441b-972c-4b4f0cde0f89@linux.ibm.com>
References: <20261124073602.2341904-1-mjambigi@linux.ibm.com>
<179550622759.3294.11500155506194750683@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1628012"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WSCRy1lv6+f61h0WF3U39qGXafs= sha256:jv3ZjTLetZKmE7D6rjTYZA1X3wFontlDwNBS4evrpZs=
sha1:OJ8m7wEmouoFjgs6+kGAbJYWLqc= sha256:I1JmiDBQu9L+5VjXcgzGZDmBrghMAZxHAuNCzIPezHs=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 3338011724C; Tue, 1 Dec 2026 08:48:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=ibm.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id S_BWdujoVVNU;
Tue, 1 Dec 2026 08:48:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-374714-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=linux.ibm.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id D79BC11723E; Tue, 1 Dec 2026 08:48:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id 8B3B623F87; Tue, 1 Dec 2026 05:48:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796104103;
b=Cp10y93PvpW474SK4ZrHsofZDAgFIX7k8fckFe3Fz5fYXUjbLOBV5mapsuiMalzMN30Z
Mu5cQSAhlH1QV2Pl22GAAQhJyuwFA/JLO97946y2CiL8U9gzOa1b5Y3B4yqMocz4nF6qy
vcJ620R8IcvrcDcX70Vy6FLlgrVABKyuixkhaSDdNhak5gXIgEdUrv7D71XOro6ZDbJib
/OabJ/L+9A3hu6khmd336ScMXAYQAy0eptgASdfS1JIRA2aF8/hBpF4Ekfg52yjui2dQ6
OyXBe/SmY9vr/tONzo7Jmk1r2s8bpmLnQtq9aMwidzAO1tb/wDBZU5Loy3p3CMXcsIA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796104103;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
Received:Received:Received:Received:Received:Received:Message-ID:Date:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:
X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=4xHyqbCnnxSzN0PaFfOtIJ9dJV32whqubBJSqzKrNtw=;
b=PMZAK/x4TGKIBPZIGpeuiLoicqZSddZ1v3cd+Ilb7PyVhld4h1I36qW5JdnEkZGp+I5H
1Q9XAAOmH2t5s+ABnoKKQvi9C+17j/Ys5X1cdIJ5P54Gx/OILz5LkmP2M0STprwVDOlSb
WSrMXZs1EH1bvnfOdqODyGPwAILsL5KLBERXwcppVuoJmhcTd3fU62Axl9Z9JXYEpnv8I
bx/qEp2vXqfZeBlC6GFs4I/D7APNs2ylQnLLHF7txSFkk8loKG4DssiomU2GGtUYp9+BI
dT0+qq76PqrPXYkWGfYzKcDxPUdrkPAn9huXdFYVpXLRTCQCJLs7h3DvWuUrADoHbZw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=qMe0N1+C;
dmarc=pass header.from=linux.ibm.com;
spf=pass smtp.mailfrom=linux.ibm.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CA7C606A329;
Tue, 1 Dec 2026 05:48:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=qMe0N1+C
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.156.1
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796104102;
b=Am2HaOjpmdMLIKDVuXvfrdrEs4vuWpPbVIkitcS/lJP5aeAoKj9VuPl899ikQASSInmN
7dxP6hn7pPymIljVYsiL43kPDOgbhn8lbMYTB6Ne1120WXBvaoLvdww8fT5O1BB/F3Mhz
gVaKOaaRCStzty+pdYpR0M1MCy1I57jR6oJvqLN+KEavL0rEzBOFzMY4c6b5NDRHuZ6QF
RUZXooqZErYh33TIfJpq5oZpVF9YDP6luPTqrPYVmPuwElrrVh4Pqrc37Cu8kYlOEgcNh
NWQMwJgGkbI1mwQfa6Z5LLFWb2R2kmM7dgcZFALo77hfSz0tfVA5scIIPkVbZ+zV7ZQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796104102;
h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:
Received:Received:Received:Received:Message-ID:Date:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:
X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=4xHyqbCnnxSzN0PaFfOtIJ9dJV32whqubBJSqzKrNtw=;
b=VNy4kzQK2e9lBEhO45T97kUoCAwnrsQkJpfyCqqETnV3fj+DSEmkPkwT4825bY/PuMQB
/oXTHJALpDA0k+FcIj533mtHBiCGBb8RYUQZ1d38TpvHWETNrc2B/ndYmO9kQmS6pSe5f
TORxjCiDsYPgYL33Tw7CplZdefFxpdiDkRf1vP3mpj6rg9Fopox+ZVRCigmHNYfwwadpl
qyMu8bn1c5e+qCuVtg593ChD5M0zjYRYKDN4FfXBGKE9fR1oSzjW6dy4/2FsWQxWW9QzZ
FUKRiqTtW0QQgP5f9L7GUeyJjakP1p/x5PzwDO8MBGk2okOyh6E6xElrBhKvhyTWpaQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=linux.ibm.com;
spf=pass smtp.mailfrom=linux.ibm.com;
dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=qMe0N1+C;
arc=none smtp.remote-ip=148.163.156.1
X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25EA6606A32A;
Tue, 1 Dec 2026 05:48:21 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 25EA6606A32A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
X-Received: from pps.filterd (m0360083.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B12Z5N3783164;
Tue, 1 Dec 2026 05:48:15 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=4xHyqb
CnnxSzN0PaFfOtIJ9dJV32whqubBJSqzKrNtw=; b=qMe0N1+C8ZKUA81udNvcQ+
GMg4FEWkjln3rnLOJX3vfLMn99yRxaw+OAprdftZB5hk+f49MGJSiMDrmVwXHDTk
7VLYCNtIj3ADsVhMn3+9Ksk8kxkQot+5ZZ+bEh/9rloKHJ6pe/T0bSyDyaOaDo5Y
b13Wd7E+e6GfkEPAZW1iObGl6t4AQvPYk34HiTRbjsgkLriIS8VvY4NROepFHOvJ
OlbauCpLdMIlb4ZHQ0NZN1vxIJvLIKkUASlsYeskdVg1QvJ4wgkJ3Ktrs4pH/tnw
a3hm9xIF1JfMqNwiTfQNlXKjY2JEH4QSH+oVUYiGBf5nBb/zTPy1S92sLWYkBG0g
==
X-Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4j7pf3ua4h-1
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Tue, 01 Dec 2026 05:48:14 +0000 (GMT)
X-Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1])
by ppma11.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B12JLCL939098;
Tue, 1 Dec 2026 05:48:13 GMT
X-Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9])
by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4j8byxynpn-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Tue, 01 Dec 2026 05:48:13 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101])
by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B15mCCU7471680
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Tue, 1 Dec 2026 05:48:12 GMT
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id A53885805C;
Tue, 1 Dec 2026 05:48:12 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id B21FA58051;
Tue, 1 Dec 2026 05:48:06 +0000 (GMT)
X-Received: from [9.123.8.233] (unknown [9.123.8.233])
by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP;
Tue, 1 Dec 2026 05:48:06 +0000 (GMT)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, alibuda@linux.alibaba.com,
dust.li@linux.alibaba.com, sidraya@linux.ibm.com,
hidayath@linux.ibm.com, pasic@linux.ibm.com, horms@kernel.org,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-rdma@vger.kernel.org, stable@vger.kernel.org
X-In-Reply-To: <179550622759.3294.11500155506194750683@kernel.org>
X-TM-AS-GCONF: 00
X-Proofpoint-Reinject: loops=2 maxloops=12
X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDAyMiBTYWx0ZWRfX28edkgid7iWL
58E+Gx0IXclejzQXI4OVemLgsA+urEE7hs3X+gsfA73mILY0iCMeWzDvUQ7ZceKBRfbU3lJVyMt
3W8x1H1vebJg64GIiqFJinT1c+3gKhQ=
X-Proofpoint-ORIG-GUID: dLZai7Ao-5NqQVWoh2PZxjG3YuevPESW
X-Proofpoint-GUID: CYX-UPlQWJ6KbPmZCjHAvhQ08p4OqJv9
X-Authority-Analysis: v=2.4 cv=R6eWitRX c=1 sm=1 tr=0 ts=6b0e5f9e cx=c_pps
a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17
a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22
a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VwQbUJbxAAAA:8
a=dcj2vVfg1v-xAQKbY6oA:9 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDAyMiBTYWx0ZWRfX4d6pMvb7gVJk
fO9HQAZGGzIZ44NlBjs0DRQWNsnUqX6zJ/A4xuhTP/ZFu0u+s3d6SwWntuozjarw5LgnCCCwbUz
E5euOxFCHFPiY+WkEROQVCjq/h97pIDddj7eJo+5XbhPJaBBFHhdZ2EoQ3yvwpDJC2cH6o9HCdP
CieZYskd13vkjqmsHkQqHvK5JY0/BcvjovJEWDPcDlXzPkCtrWC7zZvHGs7/6uJTRhjkS6bHE06
VVO3f2CqV7PSW5+WZiIWpjFjuE1ptX6MgPg2Er89QS6LkrlmOsowdT9ACwowgk0DWS440vLNdxi
nq37GM1zuJ7bITxLDm5IOAev61pNIRkJjQ847VHSsZsGKoFMJ9Ukgv/fdm02T2UkzvDnYCO9Ml9
BpsMY9X8Vam9D750EdZtdTbI9Jl6Jxxa04Urgq7LmOQYD9m6xsrYCC2QH2UqmvZeqE5gS58+DQf
oJYhutduw8//oJ1zGgw==
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49
definitions=2026-12-01_01,2026-11-30_01,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
lowpriorityscore=0 priorityscore=1501 adultscore=0 spamscore=0 bulkscore=0
phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 impostorscore=0
classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0
reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010022