From: sashiko-bot@kernel.org
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v3 04/14] HID: logitech-hidpp: disable works before stopping transport
Date: Fri, 20 Nov 2026 09:01:43 +0000 [thread overview]
Message-ID: <sashiko-outbox-224810@kernel.org> (raw)
In-Reply-To: <20261120-hid-logitech-hidpp-v3-4-cfe2caa1d0eb@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] HID: logitech-hidpp: work flush with I/O stopped in
hidpp_probe()
--
commit 43c05e6ba16082cedbdbc71e25086acb4e9b0851
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
HID: logitech-hidpp: disable works before stopping transport
This commit synchronously disables hidpp->work and
hidpp->reset_hi_res_work before closing and stopping the HID transport
during probe failure and device removal.
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index d5f53b35ac6f5..0e1a9fd98fafc 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -4805,13 +4805,13 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
> return ret;
>
> hid_hw_init_fail:
> + disable_work_sync(&hidpp->work);
> + disable_work_sync(&hidpp->reset_hi_res_work);
> hid_hw_close(hdev);
[Severity: Medium]
Can disable_work_sync() here stall waiting for in-flight work items while
device I/O is stopped?
In hidpp_probe(), hid_device_io_start() enables incoming reports during
device initialization, which can schedule hidpp->work or
hidpp->reset_hi_res_work. Before calling hid_connect(), hidpp_probe()
calls hid_device_io_stop(), acquiring hdev->driver_input_lock. If
hid_connect() fails and jumps to hid_hw_init_fail, disable_work_sync()
waits for those work handlers with hdev->driver_input_lock held, so any
synchronous HID++ command inside hidpp_connect_event() or
hidpp_reset_hi_res_handler() cannot receive its reply report and stalls
until each 5-second command timeout expires. Should hid_hw_init_fail
bracket disable_work_sync() with hid_device_io_start() and
hid_device_io_stop() like hidpp_remove() does?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-hid-logitech-hidpp-v3-0-cfe2caa1d0eb@gmail.com?part=4
next prev parent reply other threads:[~2026-11-20 9:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 8:40 [PATCH v3 00/14] HID: logitech-hidpp: G920 force-feedback and battery fixes Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 01/14] HID: logitech-hidpp: fix G920 force-feedback initialization timeout Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 02/14] HID: logitech-hidpp: use GFP_ATOMIC in hidpp_ff_queue_work() Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 03/14] HID: logitech-hidpp: drain G920 FF workqueue before closing transport Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 04/14] HID: logitech-hidpp: disable works before stopping transport Dmitry Torokhov
2026-11-20 9:01 ` sashiko-bot [this message]
2026-11-20 13:51 ` Jiri Kosina
2026-11-20 18:08 ` Dmitry Torokhov
2026-11-20 18:12 ` Jiri Kosina
2026-11-20 8:40 ` [PATCH v3 05/14] HID: logitech-hidpp: do not store ERR_PTR in battery->ps Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 06/14] HID: logitech-hidpp: avoid NULL subtraction in consumer key report fixup Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 07/14] HID: logitech-hidpp: fix off-by-one in G920 force-feedback slot tracking Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 08/14] HID: logitech-hidpp: do not retry timeouts and transport errors in hidpp_send_message_sync() Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 09/14] HID: logitech-hidpp: initialize response buffer before publishing send_receive_buf Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 10/14] HID: logitech-hidpp: fix HID++ 1.0 battery mileage event parsing Dmitry Torokhov
2026-11-20 8:40 ` [PATCH v3 11/14] HID: logitech-hidpp: handle negative errors in hidpp20_get_adc_measurement_1f20() Dmitry Torokhov
2026-11-20 8:41 ` [PATCH v3 12/14] HID: logitech-hidpp: mark device online on unified battery 0x1004 events Dmitry Torokhov
2026-11-20 8:41 ` [PATCH v3 13/14] HID: logitech-hidpp: fix K750 solar battery feature lookup and reconnect Dmitry Torokhov
2026-11-20 8:41 ` [PATCH v3 14/14] HID: logitech-hidpp: expose charge_type property for battery voltage feature Dmitry Torokhov
2026-11-20 8:55 ` sashiko-bot
2026-11-20 12:14 ` [PATCH v3 00/14] HID: logitech-hidpp: G920 force-feedback and battery fixes Jiri Kosina
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-224810@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--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 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.