lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Sep 2016 14:26:55 +0200
From:   Daniel Wagner <wagi@...om.org>
To:     Ming Lei <ming.lei@...onical.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Daniel Wagner <daniel.wagner@...-carit.de>,
        "Luis R . Rodriguez" <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

Hi Ming,

On 09/08/2016 01:26 PM, Ming Lei wrote:
> On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner <wagi@...om.org> wrote:
>> From: Daniel Wagner <daniel.wagner@...-carit.de>
>> +static int fw_status_wait_timeout(struct fw_status *fw_st, long timeout)
>> +{
>> +       int ret;
>> +
>> +       ret = wait_for_completion_interruptible_timeout(&fw_st->completion,
>> +                                                       timeout);
>> +       if (ret == 0 && test_bit(FW_STATUS_ABORTED, &fw_st->status))
>> +               return -ENOENT;
>
> I guess the check should have been OR instead of AND, right?


Good catch. It should be

	if (ret != 0 && test_bit(...))
		return -ENOENT;

in case where we abort the operation instead of timing out.

cheers,
daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ