Thread (14 messages) 14 messages, 4 authors, 2016-11-10

Re: [PATCH] firmware: fix async/manual firmware loading

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2016-11-10 15:55:05
Also in: lkml

On Wed, Nov 09, 2016 at 09:39:21PM +0100, Luis R. Rodriguez wrote:
On Sun, Oct 30, 2016 at 03:50:48PM +0100, Yves-Alexis Perez wrote:
quoted
From: Yves-Alexis Perez <redacted>

wait_for_completion_interruptible_timeout() return value is either
-ERESTARTSYS (in case it was interrupted), 0 (in case the timeout expired)
or the number of jiffies left until timeout. The return value is stored in
a long, but in _request_firmware_load() it's silently casted to an int,
which can overflow and give a negative value, indicating an error.

Fix this by re-using the timeout variable and only set retval when it's
safe.
Please amend the commit log as I noted in the previous response, and
resend.
quoted
Signed-off-by: Yves-Alexis Perez <redacted>
Cc: Ming Lei <redacted>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Other than the commit log you can add on you resend:

Acked-by: Luis R. Rodriguez.

Modulo I don't personally thing this this is sable material but I'll let
Greg decide.
Does it fix a regression?  A reported issue with an older kernel version
that people have hit?  It shouldn't be hard to figure out if a patch
should be in stable or not...

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help