From: syzbot <syzbot@syzkaller.appspotmail.com>
To: crofts@kernel.org
Cc: bentiss@kernel.org, crofts@kernel.org, jic23@kernel.org,
jikos@kernel.org, linux-iio@vger.kernel.org,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
srinivas.pandruvada@linux.intel.com, viennaoffh@gmail.com
Subject: Re: [PATCH] HID: sensor-hub: Avoid holding spinlock across child iteration
Date: Fri, 20 Nov 2026 02:50:52 -0800 [thread overview]
Message-ID: <6b00260c.c48d0c14.ca62.000b.GAE@google.com> (raw)
In-Reply-To: <0428126d-684f-4b4c-a805-7dc3e2d56897@kernel.org>
> On 20/11/2026 08:56, Zheng Shuhao wrote:
>> syzbot reports a SOFTIRQ-safe -> SOFTIRQ-unsafe lock order warning during
>> sensor hub removal.
>>
>> sensor_hub_remove() currently holds sensor_data->lock while calling
>> device_for_each_child(). The child iteration enters the device core and may
>> acquire the klist lock. Since sensor_data->lock is also acquired with
>> interrupts disabled by sensor_hub_raw_event(), lockdep reports a possible
>> lock-order inversion.
>>
>> The callback only needs sensor_data->lock while checking pending.status and
>> completing pending.ready. Pass sensor_data to the callback and take the lock
>> only around that short critical section instead of holding it across
>> device_for_each_child().
>>
>> This preserves synchronization of pending.status while avoiding the lock-order
>> dependency between sensor_data->lock and the device core's klist lock.
>>
>> The syzbot report is available at:
>> https://syzkaller.appspot.com/bug?id=c7c429f6851638ece81338f90c5b29ac9c0dea1f
>>
>> Testing:
>> - Reproduced the target lockdep warning with the unmodified kernel in 3/3
>> two-CPU QEMU runs.
>> - The warning was absent with this patch in 3/3 equivalent runs.
>> - Ran the HID selftests against both baseline and patched kernels:
>> hid_bpf: 45 passed, 1 skipped, 0 failed
>> hidraw: 27 passed, 0 failed
>> hid-core, hid-apple, hid-gamepad, hid-ite, hid-keyboard, hid-mouse,
>> hid-multitouch, hid-sony, and hid-tablet all passed in both runs.
>> - hid-usb_crash.sh and hid-wacom.sh produced TAP 1..0 / rc=2 in both
>> kernels because no executable test cases were collected in this minimal
>> QEMU environment.
>> - No KASAN report, use-after-free, Oops, BUG, panic, or general protection
>> fault was observed.
>> - checkpatch.pl --strict --no-signoff reports 0 errors and 0 warnings.
>>
>> Reported-by: syzbot+c7c429f6851638ece81338f90c5b29ac9c0dea1f@syzkaller.appspotmail.com
>> Closes: https://syzkaller.appspot.com/bug?id=c7c429f6851638ece81338f90c5b29ac9c0dea1f
>> Signed-off-by: Zheng Shuhao <viennaoffh@gmail.com>
>> Tested-by: Zheng Shuhao <viennaoffh@gmail.com>
> You cannot add a Tested-by tag with your name. This is reserved for when
> someone independent of you tests your patch. Looking at the syzbot report
> there is a reproducer, so syzbot should test it. You can make syzbot test
> a patch by sending the following (note, this will trigger a test):
>
> #syz test
I see the command but can't find the corresponding bug.
The email is sent to syzbot+HASH@syzkaller.appspotmail.com address
but the HASH does not correspond to any known bug.
Please double check the address.
>
> --
> Kind regards,
> Joshua Crofts
>
next prev parent reply other threads:[~2026-11-20 10:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 7:56 [PATCH] HID: sensor-hub: Avoid holding spinlock across child iteration Zheng Shuhao
2026-11-20 9:34 ` sashiko-bot
2026-11-20 10:50 ` Joshua Crofts
2026-11-20 10:50 ` syzbot [this message]
2026-11-20 11:09 ` Joshua Crofts
2026-11-20 11:09 ` syzbot
2026-11-20 12:14 ` Srinivas Pandruvada
2026-11-20 13:49 ` Zheng Shuhao
2026-11-20 13:50 ` [PATCH v2] " Zheng Shuhao
2026-11-20 15:12 ` Srinivas Pandruvada
2026-11-20 15:30 ` Srinivas Pandruvada
2026-11-20 17:05 ` Zheng Shuhao
2026-11-20 17:56 ` Srinivas Pandruvada
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=6b00260c.c48d0c14.ca62.000b.GAE@google.com \
--to=syzbot@syzkaller.appspotmail.com \
--cc=bentiss@kernel.org \
--cc=crofts@kernel.org \
--cc=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viennaoffh@gmail.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.