🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22352

Re: [PATCH net] net/smc: fix sock reference leak on abort_work cancel

#22352
From: Dust Li
Date: Wed, 25 Nov 2026 07:28
19 lines
9196 bytes
On 2026-11-24 08:36:02, Mahanta Jambigi wrote:
>smc_cdc_msg_validate() takes a reference on the socket before queueing
>conn->abort_work, and smc_conn_abort_work() drops it when it runs. When
>smc_conn_free() cancels the work while it is still pending, for example
>because a close races with a failed CDC validation, the handler never
>runs and the reference is leaked, so the SMC socket is never freed.
>
>Drop the reference when cancel_work_sync() reports that it cancelled a
>pending work.
>
>Fixes: b286a0651e44 ("net/smc: handle incoming CDC validation message")
>Cc: stable@vger.kernel.org
>Signed-off-by: Mahanta Jambigi <mjambigi@linux.ibm.com>

Reviewed-by: Dust Li <dust.li@linux.alibaba.com>

Best regards,
Dust
Technical Details
Message-ID: <awaOMz-oWIw4CZ9d@linux.alibaba.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-371096-linux-kernel-netdev=dewy.ru
References: <20261124073602.2341904-1-mjambigi@linux.ibm.com>

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-371096-linux-kernel-netdev=dewy.ru
From: dust.li@linux.alibaba.com (Dust Li)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net/smc: fix sock reference leak on abort_work cancel
Date: Wed, 25 Nov 2026 15:28:51 +0800
Organization: Usenet Network
Message-ID: <awaOMz-oWIw4CZ9d@linux.alibaba.com>
References: <20261124073602.2341904-1-mjambigi@linux.ibm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="144555"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:JTDye0CHo82PNjzosrM9aDYnZSg= sha256:iCNDB75OvXpyoig0bWzDD2BFvGu1QrIfBSodwxUqg/A=
	sha1:+av4OfZ+vyDj1TVsIvhU/ZHCE/c= sha256:G92175KJENX7SLfaj3pO5ixAA2y+x1aPQeGFYstBxi8=
Content-Disposition: inline
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 E85DB125E40; Wed, 25 Nov 2026 10:29:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -10.55
X-Spam-Status: No, score=-10.55 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-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, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_DKIM_WL=-7.5]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.alibaba.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 O-qycoFGwW8H;
	Wed, 25 Nov 2026 10:29:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371096-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 1311B125E3F; Wed, 25 Nov 2026 10:29:02 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7547B2D838; Wed, 25 Nov 2026 07:28:59 +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=1795591738;
	b=igsustaoEQwJDrlkTOjgAI1q4dHHK6b0PzQbIHvR09lVV0slOEWgPQPl3bCENPIdk+R9
	 X5TSSYQSGxopoNn0pXPOwf+3gKwXTUspkjtBQdzSxKq6smwkMUFRXbjcICDfBGppUEr8T
	 eynZG/qEJjdIkLhz1qIRT8bMa5Lo/vOM9/4MgkSlBK/YSlDS83vlJuMOAm7we/modiM1T
	 be6DVPUc7GGanUeI/0j7pMousOhulFoX6tILxugxgHSqoWdyVaFtEC6DcvG8AZVY/x/rJ
	 feytVaqgIZBbvCE8Emn4CGAoUIFPK9s4ucHFE1V1CEFRghM0bDUBacCRPTr3aQR0Bsg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795591738;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-Alimail-AntiSpam:Received:Date:From:To:Cc:Subject:Message-ID:
	 Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To;
	bh=J/SBvBXFi8GMnR3nIyKcHK3QnWViRP9ScHpg6onFgeY=;
	b=WGn6oJCSUGwawBWMZhdOlJ4vPi5cTPIz0AsilkaXSA6B/EfzDBvHaDNllHr2ZKhTcqca
	 CKBIu9OrQFRjKUwGkBurq5Rc+C0pZJF8kiyO29qfbU+zFnWlOFwhnXJGCgUTuadBy60RQ
	 ARsE3VSGBnqHaRtPdj5+rYDwzHYctmu5VkwsghaQBrYqGyWJQIIfN550j+g1WLn3l6qBz
	 7baQzA0vtFKKIeWAM8yst5b16iH61gk4Z8Hx86rVLGvAbwPYKYRjYMm6P2UUb8FxtKn2f
	 bj6AQwvvpL9GvKNYex47h0OP+jvVbm4Tv7UfZfVpTALQjZ7XmwmQH8lePWTez4zIh8w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=IPKz0iOe;
	dmarc=pass header.from=linux.alibaba.com;
	spf=pass smtp.mailfrom=linux.alibaba.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 9833F606A334;
	Wed, 25 Nov 2026 07:28:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=IPKz0iOe
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.124
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795591737;
	b=5U3fwPLVLaPWjGyKR6giQkOUEgKAXcxt2RcsarcViXIVHZoNXgZYsFE63Hj2S8nknE/7
	 QYmpfwq3z3VQpKOQq/yeHzxehb5McoCh73stTC/yP7PgVFFQ11PxjHRHPOuKHGzg+8sBV
	 ByjpH7Wri7TfIFVF0pVSRct7a6hWqTh3fvposwUnHZFYHgY+nynOwgWvzIcb2hALbSAMS
	 nb6MzwyEBtuYfyEgYd5cnX8dUspWEOfdguXSrvT1Rdh2Hy4w1JsOenYJeBr6VfYPcdnqf
	 TxxlCT+MwSIBYw60uFXkK7VYPSqOPlPLGbD4Y8xBkBjnaBN71HrKNEcgd0PPxauWaYw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795591737;
	h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Date:From:To:
	 Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=J/SBvBXFi8GMnR3nIyKcHK3QnWViRP9ScHpg6onFgeY=;
	b=cYbvsDVzmXVhqsMNIODK5OZ5YLkYrck0BPVyI9QZdSFtWAeh/GPsErmQR6QTfULMPYsX
	 SQ/QciKYPo/eqyPAzOdiSKyejiP8GDEWg0iWYw4CqpKjhFp89aehKExjYzApdIpYrNoMN
	 162rFYkR9sFrT/oOujW0ITyuqncmZwepnS25yqd44fCKIlk8/N4hUkXMeIiKZuvrJK+iQ
	 I2bjthMJtyyCXkdjBN5vy4wEsnAi7jt+THByhHzQUs45mIsxghgv7xcW1CJLMMZozlgUh
	 CiXeMPEDeq+3/Xp1z07sk8pY8f3pfKwR+x4/ylrwWGow8npq2hRKUpR9/vp764KEhgQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.alibaba.com;
	spf=pass smtp.mailfrom=linux.alibaba.com;
	dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=IPKz0iOe;
	arc=none smtp.remote-ip=115.124.30.124
X-Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124])
	(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 9BAC8606A31E;
	Wed, 25 Nov 2026 07:28:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9BAC8606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=linux.alibaba.com; s=default;
	t=1795591733; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type;
	bh=J/SBvBXFi8GMnR3nIyKcHK3QnWViRP9ScHpg6onFgeY=;
	b=IPKz0iOekrNIdyUp+SxxgKBSQ+H96vzJjASZeKP24JQTNQanD6T6pAd8gFwa04GjSHaucczObNvZ/34M5r38x4CpjUFd0Dsb5YOcLrg4ayxCcjk6NEILUgUTYxl0P2ctHthIJPzRtGpOUDXA3AS6Q1NQplE2PqFkNiHUus9ndVU=
X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R401e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XFQu255_1795591731;
X-Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0XFQu255_1795591731 cluster:ay36)
          by smtp.aliyun-inc.com;
          Wed, 25 Nov 2026 15:28:52 +0800
X-Cc: 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-Reply-To: dust.li@linux.alibaba.com
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-In-Reply-To: <20261124073602.2341904-1-mjambigi@linux.ibm.com>