From: sashiko-bot@kernel.org
To: "Sanjay Govind" <sanjay.govind9@gmail.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH] HID: sony: fix sleeping in atomic context in RB3 Pro raw event handler
Date: Sun, 08 Nov 2026 00:18:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-203410@kernel.org> (raw)
In-Reply-To: <20261108001057.29776-2-sanjay.govind9@gmail.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] HID: sony: incorrect jiffies initialization in sony_probe()
[1]
--
commit b4e6f33044b15e23503ab50df025ce6ffced3a7d
Author: Sanjay Govind <sanjay.govind9@gmail.com>
HID: sony: fix sleeping in atomic context in RB3 Pro raw event handler
This commit defers rb3_pro_instrument_enable_full_report() from the raw
event handler to the sony state worker so that the GFP_KERNEL allocation
and synchronous HID feature report request run in process context.
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index 50f5ad6bbeb4c..9ee175f9e58d2 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
[ ... ]
> @@ -1098,10 +1098,10 @@ static int rb3_pro_instrument_raw_event(struct sony_sc *sc, u8 *rd, int size)
> if (size < 25 || rd[24] != 0x02)
> return 0;
>
> - /* Only attempt to enable full report every 8 seconds */
> + /* Only attempt to enable full report every 8 seconds, from the worker */
> if (time_after(jiffies, sc->rb3_pro_poke_jiffies)) {
> sc->rb3_pro_poke_jiffies = jiffies + secs_to_jiffies(8);
> - rb3_pro_instrument_enable_full_report(sc);
> + sony_schedule_work(sc);
> }
[Severity: Medium]
This problem wasn't introduced by this patch, but can time_after(jiffies,
sc->rb3_pro_poke_jiffies) [1] stay false for the first 5 minutes
after boot?
sony_probe() leaves sc->rb3_pro_poke_jiffies at 0, while jiffies starts at
INITIAL_JIFFIES (-300 * HZ). Until jiffies wraps past 0, time_after(jiffies,
0) evaluates to false and full reporting mode is never enabled on the
instrument.
[1] https://sashiko.dev/#/bug/linux-bbf93673-dc17-4826-b162-980cf3f12da0
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261108001057.29776-2-sanjay.govind9@gmail.com?part=1
prev parent reply other threads:[~2026-11-08 0:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 0:10 [PATCH] HID: sony: fix sleeping in atomic context in RB3 Pro raw event handler Sanjay Govind
2026-11-08 0:18 ` sashiko-bot [this message]
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=sashiko-outbox-203410@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sanjay.govind9@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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