From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rik van Riel <riel@surriel.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH] input/evdev: move kill_fasync() outside buffer_lock to fix SOFTIRQ deadlock
Date: Wed, 13 May 2026 13:01:58 -0700 [thread overview]
Message-ID: <agTXYr_fFGiJ7lAe@google.com> (raw)
In-Reply-To: <20260513115000.77ec5975@fangorn>
Hi Rik,
On Wed, May 13, 2026 at 11:50:00AM -0400, Rik van Riel wrote:
> buffer_lock is a SOFTIRQ-safe spinlock. kill_fasync() acquires fa_lock
> (SOFTIRQ-unsafe), creating a potential SOFTIRQ-safe->SOFTIRQ-unsafe lock
> ordering violation that lockdep flags as a deadlock.
>
> Fix by moving the kill_fasync() call to evdev_pass_values() after
> buffer_lock is released, alongside the existing wake_up_interruptible_poll().
>
> The wakeup condition check is the same in __pass_event() and
> evdev_pass_values()
Does this really fix anything? This code is running holding
input->event_lock with IRQs off...
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-05-13 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 15:50 [PATCH] input/evdev: move kill_fasync() outside buffer_lock to fix SOFTIRQ deadlock Rik van Riel
2026-05-13 20:01 ` Dmitry Torokhov [this message]
2026-05-14 13:06 ` Rik van Riel
2026-05-14 7:06 ` sashiko-bot
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=agTXYr_fFGiJ7lAe@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.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.