linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stuart <stuart.a.hayhurst@gmail.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	 Benjamin Tissoires <bentiss@kernel.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver
Date: Mon, 10 Feb 2025 16:15:11 +0000	[thread overview]
Message-ID: <CALTg27kaxGOzq2k-dAqbXZ0ez5e-WZRU47Z2eP5297VVHF81kA@mail.gmail.com> (raw)
In-Reply-To: <afb96547-7ff3-4070-b960-33f4af7e3edc@kernel.org>

> This effectively kills the system. We came here via:
> corsair_void_raw_event (hid_driver::raw_event)
>    -> corsair_void_process_receiver
>      -> scoped_guard(mutex, &drvdata->battery_mutex)

> And hid_driver::raw_event can be called from the interrupt context. This
> happened at:

Damn it, I was suspicious that it was too easy. It's been running for a year
without an issue on my system, I'll clearly have to read a bit more.

I'm not sure what the best solution is for this.
'corsair_void_process_receiver()' shouldn't be called frequently, and
the locks shouldn't be waiting on each other very often, so I suppose
swapping the mutex for a spinlock is probably the best option, instead of
increasing code complexity?

Happy to put a patch in for whatever seems best :)

Thanks,
Stuart

  reply	other threads:[~2025-02-10 16:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 23:30 [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver Stuart Hayhurst
2024-10-11 11:12 ` Jiri Kosina
2025-02-10  7:26 ` Jiri Slaby
2025-02-10  7:32   ` Jiri Slaby
2025-02-10 16:15     ` Stuart [this message]
2025-02-10 17:43       ` Jiri Slaby
2025-02-10 18:31         ` Stuart
2025-02-10 19:34           ` Jiri Slaby
2025-02-10 20:32             ` Stuart
2025-02-11  5:36               ` Jiri Slaby
2025-02-11 11:30                 ` Stuart
2025-02-11 12:02                   ` Jiri Slaby
2025-02-11 12:44                     ` Stuart
2025-02-11 17:40                       ` Jiri Slaby

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=CALTg27kaxGOzq2k-dAqbXZ0ez5e-WZRU47Z2eP5297VVHF81kA@mail.gmail.com \
    --to=stuart.a.hayhurst@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jikos@kernel.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).