mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ming Lei <ming.lei@canonical.com>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH] firwmare: Correct handling of fw_state_wait() return value
Date: Thu, 8 Dec 2016 16:28:18 +0100	[thread overview]
Message-ID: <20161208152818.GF1402@wotan.suse.de> (raw)
In-Reply-To: <dcb7e5b0-fc88-2719-8b96-af8b84b7778a@bmw-carit.de>

On Thu, Dec 08, 2016 at 03:47:22PM +0100, Daniel Wagner wrote:
> On 12/07/2016 02:01 AM, Bjorn Andersson wrote:
> > When request_firmware() finds an already open firmware object it will
> > wait for that object to become fully loaded and then check the status.
> > As __fw_state_wait_common() succeeds the timeout value returned will be
> > truncated in _request_firmware_prepare() and interpreted as -EPERM.
> > 
> > Prior to "firmware: do not use fw_lock for fw_state protection" the code
> > did test if we where in the "done" state before sleeping, causing this
> > particular code path to succeed, in some cases.
> > 
> > As the callers are interested in the result of the wait and not the
> > remaining timeout the return value of __fw_state_wait_common() is
> > changed to signal "done" or "error", which simplifies the logic in
> > _request_firmware_load() as well.
> 
> Oops, sorry about that one. With your fix the code starts to make sense.
> 
> > Fixes: 5b029624948d ("firmware: do not use fw_lock for fw_state protection")
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> Reviewed-by: Daniel Wagner <daniel.wagner@bmw-carit.de>

Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>

  Luis

      reply	other threads:[~2016-12-08 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07  1:01 Bjorn Andersson
2016-12-08 14:47 ` Daniel Wagner
2016-12-08 15:28   ` Luis R. Rodriguez [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=20161208152818.GF1402@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ming.lei@canonical.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

all inboxes | Powered by JetHome®