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:   Mon, 19 Sep 2022 23:02:14 +0000
From:   Vladimir Oltean <>
To:     Andrew Lunn <>
CC:     "" <>,
        netdev <>,
        Florian Fainelli <>,
        Christian Marangi <>
Subject: Re: [PATCH rfc v0 4/9] net: dsa: qca8k: dsa_inband_request: More
 normal return values

On Tue, Sep 20, 2022 at 12:18:48AM +0200, Andrew Lunn wrote:
> wait_for_completion_timeout() has unusual return values.  It can
> return negative error conditions. If it times out, it returns 0, and
> on success it returns the number of remaining jiffies for the timeout.

The one that also returns negative errors is wait_for_completion_interruptible()
(and its variants).  In my experience the interruptible version is also
a huge foot gun, since user space can kill the process waiting for the
RMU response, and the RMU response can still come afterwards, while no
one is waiting for it.  The noninterruptible wait that we use here
really returns an unsigned long, so no negatives.

Powered by blists - more mailing lists