From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.37.255.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796213948; b=cdPiThgf93Sf/BWAHszkIaN8ilbkaxX1QQssrc29Fm2k7BQQhASffLaOyYGh2VqnEAje PFNID+EzMfIvbVkU1pedJfU66mhcF/1cA7HYYzHlX1KjIYuP5BuTfDNmz49cbRC/xD9fa rxUX7Q45nxECeitCATDqBmahw/lu0MloM6L6P3Ua2xIeb50/JNF1i9fExs2OxXQrcjb69 zlloNgUGnNHcHVGn1oB0SYPq0xSNk6t424fXPYSB92mB3U+y6r7G2BqQ3Vk9ZsXMlbnUT dJWznW7M8VgddvLAPy9Em9L/GDA6UoMgiA5rFe/XT/Krh9hcJ2Hq0srUDYPCBHT7PJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796213948; h=DMARC-Filter:Received:Received:DKIM-Signature:Received:Received: Received:MIME-Version:Content-Type:Content-Transfer-Encoding:Date: From:To:Cc:Subject:Organization:In-Reply-To:References:Message-ID: X-Sender:User-Agent:X-Spam-Status:X-Spam-Checker-Version:X-purgate: X-purgate-ID:X-purgate-type; bh=5uLCSylQmi4vxh6ysl+DQRfXuWy/BhKSLniRWesafsg=; b=sz7XMkqudGvRtDqZ5LgGcwMUFj8Jt2S3lxPQh/n7jEv6G1dKfblpbK6MeI302I77DtmF h3X3OQbeNizyKFriY7bSMFxhHCq5TXjsTM0rh8BeZrtMOG9ghpD/9Rn8wl4jjrJJ9hTSB oqYXlx1j/jhNsph49l2brcOrXnj/N9c5P2RUmPFo1KqqkH9ihVTz9jmZHNIx9WIXCS0DP WMQHu7TbyFODm1UZV4aEVPPXBheM6wHl739Nz/wW3Qo6Rqt1GUSpk8e9nxIeFddJQ6NUi wnTpVTDdgodWUKEQM1UHLZi/y7y2ImY2Vvl1vssRA6MV3cwWxs/Lzt5qOGYr0nPgr5g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=dev.tdt.de; spf=pass smtp.mailfrom=dev.tdt.de; dkim=pass header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=cpuD33yX; arc=none smtp.remote-ip=194.37.255.70 Received: from mxout70.expurgate.net (mxout70.expurgate.net [194.37.255.70]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36DD7606A31A; Wed, 2 Dec 2026 12:19:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 36DD7606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dev.tdt.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dev.tdt.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=cpuD33yX Received: from [194.37.255.9] (helo=mxout.expurgate.net) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1xYjIZ-003dT7-Mh; Wed, 02 Dec 2026 13:18:59 +0100 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1xYjIY-00EyaT-Hz; Wed, 02 Dec 2026 13:18:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev.tdt.de; s=z1-selector1; t=1796213938; bh=5uLCSylQmi4vxh6ysl+DQRfXuWy/BhKSLniRWesafsg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cpuD33yXpPxo+rZg3c/moowBfq8KP+FT2YRNeh04X8yVg+LrO6Zdc3Hz4r/uX/nWP nN3z/P1GLhXRwbZ+Bo/+NmgGaHCjR39ANta7fHcpXEIRflTksTdjJHs0lWQi7CzjrO 9QoiKpRuLM9kL4GddZyGPurVtzZeTOqSZahd52/XqTtN1lfUgDvELGDms0rjRP8NAV l9UjQybS+P0jL5fMSam0oA4OYe+7N3zJ57FKDa8Pu3ffL2lGD5dFPu4k7pKaTpTelU p5QVpfjpf3OCqqqRhyodkOFmpjFdlHN2qSIn+7IDv3Bgsw4eU77yebNaQZSWh/jrO3 Ftl+0KWtb28MA== Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id F4178240040; Wed, 2 Dec 2026 13:18:57 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id EE2C2240036; Wed, 2 Dec 2026 13:18:57 +0100 (CET) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 882502A88C; Wed, 2 Dec 2026 13:18:57 +0100 (CET) X-Mailing-List: linux-x25@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Wed, 2 Dec 2026 13:18:57 +0100 (CET) From: Martin Schiller To: sashiko-reviews@lists.linux.dev Cc: linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-x25@vger.kernel.org Subject: Re: [PATCH net v3 1/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh() Organization: TDT AG In-Reply-To: References: <20261201-x25-kill-by-neigh-v3-0-7f05bdff15b1@dev.tdt.de> <20261201-x25-kill-by-neigh-v3-1-7f05bdff15b1@dev.tdt.de> Message-ID: X-Sender: ms@dev.tdt.de User-Agent: Roundcube Webmail/1.3.17 X-purgate: clean X-purgate-ID: 151534::1796213939-514B612C-0E4BB0C2/0/0 X-purgate-type: clean On Wed, 02 Dec 2026 13:02:09 +0100, sashiko-bot@kernel.org wrote: > Should x25_process_rx_frame() also bail out when X25_KILL_FLAG is set? No. Frames on the backlog arrived before the link event and belong to the call, so they are still handled: data is delivered to the user, and a CLEAR REQUEST from the peer clears the call. Anything they would make the socket send is suppressed by X25_KILL_FLAG. > For example, a backlogged > X25_CLEAR_REQUEST or X25_CLEAR_CONFIRMATION frame calls > x25_disconnect(sk, 0, ...), clearing x25->neighbour and setting > sk->sk_err = 0, so x25_release_cb() then skips > x25_disconnect(sk, ENETUNREACH, 0, 0) and clears X25_KILL_FLAG, losing > ENETUNREACH That matches the current behaviour: x25_kill_by_neigh() takes lock_sock(), so release_sock() runs the backlog first, and it then only disconnects the socket if x25->neighbour is still the neighbour. If the peer cleared the call before the link went away, the socket reports that clear, with its cause and diagnostic, in both cases. The NULL pointer dereference in x25_recvmsg() is what patch 2 fixes.