From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Yves-Alexis Perez <corsac@corsac.net>
Cc: linux-kernel@vger.kernel.org, johannes@sipsolutions.net, j@w1.fi,
jslaby@suse.com, teg@jklm.no, kay@vrfy.org,
jwboyer@fedoraproject.org, dmitry.torokhov@gmail.com,
luto@amacapital.net, harald@redhat.com,
seth.forshee@canonical.com, wagi@monom.org,
"Luis R . Rodriguez" <mcgrof@kernel.org>,
Ming Lei <ming.lei@canonical.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] firmware: fix async, manual firmware loading
Date: Fri, 11 Nov 2016 20:10:56 +0100 [thread overview]
Message-ID: <20161111191056.GW13978@wotan.suse.de> (raw)
In-Reply-To: <20161111153217.571-1-corsac@corsac.net>
On Fri, Nov 11, 2016 at 04:32:17PM +0100, Yves-Alexis Perez wrote:
> When wait_for_completion_interruptible_timeout() is called from
> _request_firmware_load() with a large timeout value (here, MAX_JIFFY_OFFSET
> because it's a an explicit call to the user helper), its return value (a
> long) will overflow when silently casted to int, be stored as a negative
> integer and then treated as an error.
>
> This bug was introduced in commit 68ff2a00dbf5 ("firmware_loader: handle
> timeout via wait_for_completion_interruptible_timeout()") when a delay work
> was replaced by the call to wait_for_completion_interruptible_timeout().
>
> Fix this by re-using the timeout variable and only set retval in specific
> cases.
>
> Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>
> Fixes: 68ff2a00dbf5 "firmware_loader: handle timeout via wait_for_completion_interruptible_timeout()"
> Cc: Luis R. Rodriguez <mcgrof@kernel.org>
> Cc: Ming Lei <ming.lei@canonical.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: stable@vger.kernel.org
> Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Sorry this commit log still does not help kernel maintainers enough, we want
them well informed immediately what the default behaviour is, what the impact
of the issue is, how broad of an issue it is, how this issue is triggered and
exactly how this can happen. I'll massage this a bit myself and re-submit,
as otherwise this work will be done by each and every single Linux kernel
maintainer working on a Linux distribution trying to determine if its correct
to merge this into their tree or not.
I'll re-submit shortly.
Luis
next prev parent reply other threads:[~2016-11-11 19:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 15:32 [PATCH v2] firmware: fix async, manual firmware loading Yves-Alexis Perez
2016-11-11 19:10 ` Luis R. Rodriguez [this message]
2016-11-11 19:28 ` [PATCH] firmware: fix usermode helper fallback loading Luis R. Rodriguez
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=20161111191056.GW13978@wotan.suse.de \
--to=mcgrof@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=corsac@corsac.net \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=harald@redhat.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=jslaby@suse.com \
--cc=jwboyer@fedoraproject.org \
--cc=kay@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=ming.lei@canonical.com \
--cc=seth.forshee@canonical.com \
--cc=stable@vger.kernel.org \
--cc=teg@jklm.no \
--cc=wagi@monom.org \
/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).