From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796570241; b=p9u362/cEef6G27G8r+1/tM5bCpqDwwL9abZgpClfXEzPLWtsdkxjHTUP0iVHJ0n8fIj vPgHMv+PiAQtRSELBlSz3VkNPwUwp2XE/tUmHhvYkkLEPCbahJwC6taDjEYuPUiNdbIXY Vmvm0e3OLFN4PJsQe8TzB1gSvqkWr7z15wRax2ialx2zWRL0IbeEyhQeSMxfn7Y2s+Px2 qvAeIV9jRQGrNeEVyBj3SyFXDB+luIxdfBOMsEUJgaxx6tWD65L95jTcC3Dt01WNqzFm5 yjWk4KisjMEAw6+vXepv1zPgqaDa2h5LEMD+eRbQtUCykPqCj1npXJ/GUM4v4toXJeQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796570241; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:Content-Transfer-Encoding:MIME-Version; bh=IoSC0HHRh+GubrX8tWkPNDQ8bm9ypy/g4Tbb/SzwrKo=; b=misvM0UEAooNdagtvH4kiCIOD5LocVr3GyL8n7wLWJtEwBQAkG4YoxqbvStnB9PSo92M bSoNot+YTb0mBzZ1NZWJeHX8o+oD6JzKeIu8wLzB3jLYcy0Db7zzALQv7YQrrFn5GHR7j X6YWEXnFEs4KXtestFP7rrG0UB8ZpfNS2YDB6qo57BFe2jUFRyKvJZRpB2937pqjOdRGf 1m23tmmULzFg299YlvPfPkgXdE7uaZP3SV3FJ6fYTgwBrp6pLkeM6VdHE0gLotnKHXYDi L5fPZeG2Er5VmYyyEwgODM08+ACqIuNwgLj1UohOKdniN47PaerLYfJd+5L6xtnpRHg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=GXJgHvP8; arc=none smtp.remote-ip=209.85.214.180 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89332606A321 for ; Sun, 6 Dec 2026 15:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 89332606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=GXJgHvP8 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2f02f04a426so19563135ad.1 for ; Sun, 06 Dec 2026 07:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796570241; x=1797175041; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=IoSC0HHRh+GubrX8tWkPNDQ8bm9ypy/g4Tbb/SzwrKo=; b=GXJgHvP8LBbwrBWMHKi+LVlf80UfJdB1QbDnuDxto17vfNrtTJyLOp+BKHPRi8rD/A OtTX8X3Rt3a3N4IgPFqUCQOllh2JHVPnlF3ikN+5bKXkKmATskEp6plH0DMNqOqQBadO 3EhTrFdHCdsPxyCtsQbopfA3RpV8l4WL92Bx3AHitWcjUNK0J6yxealm4CTbUlIv6G0A ibIyDRShUqf2uaVA+0PJqt4vDNPyw3PJfW1QdBBcahlSmFkgnMi4y25C+WlOSFhBe5dg YpEqRwR6GO2t5DJqToLtrmYeDXP+OEuJ4SSeM6GaM+hUqQbvMtrejDxjKqicG6ygRiRQ 0cpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796570241; x=1797175041; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IoSC0HHRh+GubrX8tWkPNDQ8bm9ypy/g4Tbb/SzwrKo=; b=Xa9mS6WAOYPAhBClghnEkFFzjmyEjypZ4utJW/uk8Uw8W6IpIcLisaJNbyYaPjmvpJ ACo4oN40Hx9JA68eUVn7uL/RDoZqzJsCBPYiS0xXXo77qqukztwRbdXm4jg1GDlZN2Hc o8Ceqjazx6dUal5KP4VdrwzDfOuaW5AdZXE8rbZ55lVdsQ8d8z7uZBQ2eWlORCQvfxCS Dy8DmjuNMLAA8lIs0/4OoHG6ytC4WGDmd4CQM0Btn//eJnGFUG9qTA8lB6Z/+82TmA/L 73CRbWeIDV26dfk/nxGqapb4vUaZ2vpcn/WpygvR8PbQmOpZx2rZ/wVuBXr9xH+D4iYf nUjQ== X-Forwarded-Encrypted: i=1; AL+hErHK8CIebT5DOw8NmR7vyfwXduDroGfo0ixyLf4vmXTdaKTRWzDX2Vx3xZm9sOaQaHfUgeZ5Cpg=@vger.kernel.org X-Gm-Message-State: AB4q+uHpzPjmOvN9VSsA+0k54NHwmwzc5HBOzkdCulhHvUGtxLFET/YP /PPXmyKtDgCJSHMbNKuvZp8QbvrHqLgXTkOADdT/KOl9x0cQwQf0HZs3 X-Gm-Gg: AZFdTZevy8VH+3eMkTw3vvhbH5ahCSxpKenae2K86asEQf/uU16lPeLxXlu6V3M7sTS r6iWUZdt1FNtiuyL1h/xbNq8ZtnkHTzOxzGPomfRXbwTRQVj3Vg7Z1sZn6u6O67EEXxHSd6fk2G Xtzd+An3zcj9i/SHIje2IulGRM9gWUANgLCS8npZWIebAbLMO9KtywomHwa0DXDFFvvjY3r6xq9 QbsmN6anqRisGqWrCQDmtdCB4/xPwsFSrIBtvsM5gd0tqEIi7V6EjStqbHEQErKpFfi2A+vYv7h kHRqgJbiXsov4W41EYJuYXSnDWfz2t94Q34qaWVkCTVGwdUWWVxvemDtq4LSM3yTJTcOWf+FiGZ 8oH1F/PVQO2B/dHIuR95NCWpuZQ1yXBxkCa/zDPy6IgElzj7z5MZx53/oTRhRr3JnEeY2sY1tnK 00JVddP/rHWqXLQ0gZzp4CbI6vZRcQ/duz/FTddr5pPgXvAkGoQA5VxKq9lRRhdnvXojWhnmG39 HF24GJIkOXZVr9xhvTGC7v1D+JHRewCRa9b3O+dk5enxldny0JXguYabwAjQnaZxBSVKeSbJYCg WNIDuyAf2+8zapVplg== X-Received: by 2002:a17:902:d58a:b0:2ed:3c60:7ca with SMTP id d9443c01a7336-2f1ba1a3281mr77059425ad.40.1796570240603; Sun, 06 Dec 2026 07:17:20 -0800 (PST) Received: from CanCanNeed-2.local ([2001:df6:11c0:e720::1]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f1b798ef36sm37010955ad.75.2026.12.06.07.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 07:17:20 -0800 (PST) From: Qican Ma To: netdev-bot+sashiko@kernel.org Cc: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com, sidraya@linux.ibm.com, mjambigi@linux.ibm.com, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, willemb@google.com, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net v4] net/smc: serialize clcsock release against CDC receive path Date: Sun, 06 Dec 2026 23:17:11 +0800 Message-ID: <179657023158.87613.10037394445377927017@gmail.com> In-Reply-To: <179643993329.3146.692765287538829589@kernel.org> References: <179635082914.26472.6075133370101625319@gmail.com> <179643993329.3146.692765287538829589@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Hi, Thanks for the detailed review. I have sent v5 addressing these points. On the first High issue (abort_work deadlock timing): the analysis is correct. Moving smc_conn_free() ahead of the clcsock release also moves its cancel_work_sync(&conn->abort_work) ahead of the lock-drop window that previously let a lock-starved abort_work complete, and smc_conn_abort_work() does take lock_sock() first. v5 cancels abort_work with the lock dropped in __smc_release() before calling smc_conn_free(), mirroring smc_close_cancel_work(), and compensates the scheduler's sock_hold() when the work is dequeued before running. The same sock_hold() leak in smc_conn_free()'s own cancel path is fixed as well. The remaining smc_conn_free() callers share the pre-existing deadlock pattern regardless of this patch; I agree it deserves a separate fix and this patch does not make it worse than those paths. On the second High issue (smc_accept_dequeue()): correct, the guard does not cover that path, which never calls smc_conn_free() and releases the clcsock of a never-accepted SMC_CLOSED child under the parent's lock only. That is a distinct pre-existing site and I would prefer to handle it in a follow-up patch rather than widen this one; the commit message already scopes the guarantee to smc_clcsock_release(). On the Medium issue (tx reachability): the fd lifetime argument is a fair point and I cannot rule out that the cork path is unreachable in practice. The guard is cheap defense-in-depth against the same class of dereference (and the NULL case), so I have kept it, but the commit message no longer claims more than that, per Mahanta's review. If the maintainers prefer it dropped I can respin without it. pw-bot: cr