[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <159664848938.1360974.193633020977562116@swboyd.mtv.corp.google.com>
Date: Wed, 05 Aug 2020 10:28:09 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Douglas Anderson <dianders@...omium.org>
Cc: Alex Elder <elder@...aro.org>, mka@...omium.org,
Douglas Anderson <dianders@...omium.org>,
Andy Gross <agross@...nel.org>, Vinod Koul <vkoul@...nel.org>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] soc: qcom: aoss: qmp_send() can't handle interruptions so stop pretending
Quoting Douglas Anderson (2020-08-05 09:16:11)
> The function qmp_send() called wait_event_interruptible_timeout() to
> wait for its interrupt. However, this function did not check for
> -ERESTARTSYS and assumed that any non-zero return value meant that the
> event happened.
>
> While we could try to figure out how to handle interruptions by
> figuring out how to cancel and/or undo our transfer in a race-free way
> and then communicating this status back to all of our callers, that
> seems like a whole lot of complexity. As I understand it the transfer
> should happen rather quickly and if we're really hitting the 1 second
> timeout we're in deep doggy doodoo anyway. Let's just use the
> non-interruptible version of the function and call it good enough.
>
> Found by code inspection. No known test cases expose the problem
> described here.
>
> Fixes: 2209481409b7 ("soc: qcom: Add AOSS QMP driver")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
I would put this first in the series as it's an obvious bug fix.
Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Powered by blists - more mailing lists