[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240518230144.1856-1-hdanton@sina.com>
Date: Sun, 19 May 2024 07:01:44 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+77a2ec57108df22d5c63@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [input?] possible deadlock in evdev_cleanup (2)
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;
--
Powered by blists - more mailing lists