All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Cc: w15303746062@163.com, David Laight <david.laight.linux@gmail.com>,
	jlayton@kernel.org, chuck.lever@oracle.com,
	viro@zeniv.linux.org.uk, brauner@kernel.org,
	alex.aring@gmail.com, jack@suse.cz,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fs/fcntl: fix SOFTIRQ-unsafe lock order in fasync signaling
Date: Mon, 12 Oct 2026 17:39:34 +0200	[thread overview]
Message-ID: <asz_NnX9_KaJdaf_@redhat.com> (raw)
In-Reply-To: <437297ff-1bb4-49a7-a979-abccdd1814f8@stu.xidian.edu.cn>

Hi Mingyu,

On 10/12, Mingyu Wang wrote:
>
> In the original report, the task triggering the warning was in process
> context, through a TTY ioctl. Here are the relevant excerpts; omissions
> are marked with [...].

Thanks... so according to lockdep we have the

	&dev->event_lock --> &f_owner->lock --> tasklist_lock

chain. At first glance this suggests that kill_fasync()->send_sigio() can
be called under input_dev->event_lock. But I know nothing about drivers/input,
so I can't find who does this...

And,

> input_inject_event+0xa4/0x3b0 drivers/input/input.c:419
...
> kbd_bh+0x23c/0x310 drivers/tty/vt/keyboard.c:1244
> tasklet_action_common+0x25c/0x3d0 kernel/softirq.c:925

means that ->event_lock can be acquired in softirq context.

That is all I can understand right now. Can you can send the full full
report without omissions? Not that I think this will help, at least to me ;)

Perhaps something like:

read_lock(tasklist)	lock(event_lock)
						write_lock(tasklist)
<Interrupt>
lock(event_lock)	// send_sigio()
			// ...
			read_lock(tasklist)
			
Oleg.


  reply	other threads:[~2026-10-12 15:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  8:02 [PATCH] fs/fcntl: fix SOFTIRQ-unsafe lock order in send_sigio() w15303746062
2026-05-23 11:08 ` Jeff Layton
2026-05-23 13:52   ` [PATCH v2] fs/fcntl: fix SOFTIRQ-unsafe lock order in fasync signaling w15303746062
2026-05-28 12:40     ` Christian Brauner
2026-10-04 11:31     ` Oleg Nesterov
2026-10-11 15:57       ` Oleg Nesterov
2026-10-12  1:42         ` Mingyu Wang
2026-10-12 15:39           ` Oleg Nesterov [this message]
2026-10-12 16:00             ` Mingyu Wang
2026-10-12 16:29               ` Oleg Nesterov
2026-10-12 17:33                 ` Oleg Nesterov
2026-10-13  1:36                   ` Mingyu Wang
2026-10-12 11:59         ` Jeff Layton
2026-10-12 15:15           ` Oleg Nesterov

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=asz_NnX9_KaJdaf_@redhat.com \
    --to=oleg@redhat.com \
    --cc=25181214217@stu.xidian.edu.cn \
    --cc=alex.aring@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=david.laight.linux@gmail.com \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=w15303746062@163.com \
    /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.