From: mikhail.v.gavrilov@gmail.com
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: uinput - fix circular locking dependency with ff-core
Date: Wed, 11 Mar 2026 22:47:25 +0500 [thread overview]
Message-ID: <e28527adc34ace88462f2fcce53ab8586dc760a7.camel@gmail.com> (raw)
In-Reply-To: <20260228223628.472208-1-mikhail.v.gavrilov@gmail.com>
On Sun, 2026-03-01 at 03:36 +0500, Mikhail Gavrilov wrote:
> A lockdep circular locking dependency warning can be triggered
> reproducibly when using a force-feedback gamepad with uinput (for
> example, playing ELDEN RING under Wine with a Flydigi Vader 5
> controller):
>
> ff->mutex -> udev->mutex -> input_mutex -> dev->mutex -> ff->mutex
>
> The cycle is caused by four lock acquisition paths:
>
> 1. ff upload: input_ff_upload() holds ff->mutex and calls
> uinput_dev_upload_effect() -> uinput_request_submit() ->
> uinput_request_send(), which acquires udev->mutex.
>
> 2. device create: uinput_ioctl_handler() holds udev->mutex and calls
> uinput_create_device() -> input_register_device(), which acquires
> input_mutex.
>
> 3. device register: input_register_device() holds input_mutex and
> calls kbd_connect() -> input_register_handle(), which acquires
> dev->mutex.
>
> 4. evdev release: evdev_release() calls input_flush_device() under
> dev->mutex, which calls input_ff_flush() acquiring ff->mutex.
>
>
>
Hi Dmitry,
Friendly ping on this patch. It fixes a reproducible lockdep circular
dependency warning in uinput with force-feedback gamepads under
Wine/Proton, tested on 7.0-rc1.
I realize I should have included:
Fixes: ff462551235d ("Input: uinput - switch to the new FF
interface")
Cc: stable@vger.kernel.org
Should I resend as v2 with these tags, or can you add them when
applying?
--
Best Regards,
Mike Gavrilov.
next prev parent reply other threads:[~2026-03-11 17:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 22:36 [PATCH] Input: uinput - fix circular locking dependency with ff-core Mikhail Gavrilov
2026-03-11 17:47 ` mikhail.v.gavrilov [this message]
2026-03-11 17:50 ` Dmitry Torokhov
2026-03-23 2:47 ` Dmitry Torokhov
2026-03-23 5:17 ` Mikhail Gavrilov
2026-03-23 5:34 ` Dmitry Torokhov
2026-03-23 5:39 ` Mikhail Gavrilov
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=e28527adc34ace88462f2fcce53ab8586dc760a7.camel@gmail.com \
--to=mikhail.v.gavrilov@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox