All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
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()
Date: Wed, 2 Dec 2026 13:18:57 +0100 (CET)	[thread overview]
Message-ID: <ab6bf3bd801fbd620494a454e7bc28a5@dev.tdt.de> (raw)
In-Reply-To: <sashiko-outbox-245652@kernel.org>

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.

  reply	other threads:[~2026-12-02 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 12:01 [PATCH net v3 0/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh() Martin Schiller
2026-12-01 12:01 ` [PATCH net v3 1/2] " Martin Schiller
2026-12-02 12:02   ` sashiko-bot
2026-12-02 12:18     ` Martin Schiller [this message]
2026-12-01 12:01 ` [PATCH net v3 2/2] net/x25: re-check x25->neighbour after re-acquiring the socket lock Martin Schiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab6bf3bd801fbd620494a454e7bc28a5@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.