From: David Howells <dhowells@redhat.com>
To: Alexandra Diupina <adiupina@astralinux.ru>
Cc: dhowells@redhat.com, Marc Dionne <marc.dionne@auristor.com>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] afs: Fix checking wait_event_interruptible() return value
Date: Fri, 13 Sep 2024 16:48:39 +0100 [thread overview]
Message-ID: <1368425.1726242519@warthog.procyon.org.uk> (raw)
In-Reply-To: <20240911182853.19634-1-adiupina@astralinux.ru>
Alexandra Diupina <adiupina@astralinux.ru> wrote:
> The if-block in question is presumably supposed to handle
> wait_event_interruptible() failure, i.e. when it returns -ERESTARTSYS
> due to signal received by the task instead of a zero value.
>
> Fix the condition appropriately.
> ...
> - if (ret > 0) {
> + if (ret < 0) {
This isn't correct. If we take a signal, we need to drop out immediately
rather than going round again. However, you're right and "ret > 0" won't ever
happen. I need to have a ponder on this.
David
prev parent reply other threads:[~2024-09-13 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 18:28 [PATCH] afs: Fix checking wait_event_interruptible() return value Alexandra Diupina
2024-09-13 15:48 ` David Howells [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=1368425.1726242519@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=adiupina@astralinux.ru \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=marc.dionne@auristor.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