From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Vicki Pfau <vi@endrift.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH 1/2] Input: uinput - Allow uinput_request_submit wait interrupting
Date: Fri, 8 Dec 2023 19:32:16 +0000 [thread overview]
Message-ID: <ZXNvQCFxPoH0-i-P@google.com> (raw)
In-Reply-To: <20231207063406.556770-2-vi@endrift.com>
Hi Vicki,
On Wed, Dec 06, 2023 at 10:34:05PM -0800, Vicki Pfau wrote:
> Currently, uinput_request_submit will only fail if the request wait times out.
> However, in other places this wait is interruptable, and in this specific
> location it can lead to issues, such as causing system suspend to hang until
> the request times out.
Could you please explain how a sleeping process can cause suspend to
hang?
> Since the timeout is so long, this can cause the
> appearance of a total system freeze. Making the wait interruptable resolves
> this and possibly further issues.
I think you are trying to find a justification too hard and it does not
make sense, however I agree that allowing to kill the process issuing
the request without waiting for the timeout to expire if the other side
is stuck might be desirable.
I think the best way to use wait_for_completion_killable_timeout()
so that stray signals do not disturb userspace, but the processes can
still be terminated.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2023-12-08 19:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 6:34 [PATCH 0/2] Input: uinput - Multiple concurrency fixes in ff request handling Vicki Pfau
2023-12-07 6:34 ` [PATCH 1/2] Input: uinput - Allow uinput_request_submit wait interrupting Vicki Pfau
2023-12-08 19:32 ` Dmitry Torokhov [this message]
2023-12-09 3:24 ` Vicki Pfau
2023-12-15 3:04 ` Vicki Pfau
2024-01-12 1:37 ` Vi Pfau
2024-01-22 4:03 ` Dmitry Torokhov
2025-12-10 3:37 ` Vicki Pfau
2023-12-07 6:34 ` [PATCH 2/2] Input: uinput - Release mutex while unregistering input device Vicki Pfau
2023-12-08 19:58 ` Dmitry Torokhov
2023-12-09 3:24 ` Vicki Pfau
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=ZXNvQCFxPoH0-i-P@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=vi@endrift.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 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).