From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+77a2ec57108df22d5c63@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [input?] possible deadlock in evdev_cleanup (2)
Date: Sun, 19 May 2024 07:01:44 +0800 [thread overview]
Message-ID: <20240518230144.1856-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000de2ee50618bb2490@google.com>
On Sat, 18 May 2024 07:18:36 -0700
> syzbot found the following issue on:
>
> HEAD commit: fda5695d692c Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=134d3182980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
--- l/drivers/input/misc/uinput.c
+++ u/drivers/input/misc/uinput.c
@@ -311,6 +311,7 @@ static int uinput_create_device(struct u
struct input_dev *dev = udev->dev;
int error, nslot;
+ lockdep_assert_held(&udev->mutex);
if (udev->state != UIST_SETUP_COMPLETE) {
printk(KERN_DEBUG "%s: write device info first\n", UINPUT_NAME);
return -EINVAL;
@@ -362,7 +363,9 @@ static int uinput_create_device(struct u
input_set_drvdata(udev->dev, udev);
- error = input_register_device(udev->dev);
+ mutex_unlock(&udev->mutex);
+ error = input_register_device(dev);
+ mutex_lock(&udev->mutex);
if (error)
goto fail2;
--
next prev parent reply other threads:[~2024-05-18 23:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-18 14:18 syzbot
2024-05-18 23:01 ` Hillf Danton [this message]
2024-05-18 23:50 ` syzbot
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=20240518230144.1856-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+77a2ec57108df22d5c63@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®