[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1368425.1726242519@warthog.procyon.org.uk>
Date: Fri, 13 Sep 2024 16:48:39 +0100
From: David Howells <dhowells@...hat.com>
To: Alexandra Diupina <adiupina@...ralinux.ru>
Cc: dhowells@...hat.com, Marc Dionne <marc.dionne@...istor.com>,
linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH] afs: Fix checking wait_event_interruptible() return value
Alexandra Diupina <adiupina@...ralinux.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
Powered by blists - more mailing lists