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] [day] [month] [year] [list]
Message-ID: <Y/TeMdxgtnPaEIgg@hoboy.vegasvil.org>
Date:   Tue, 21 Feb 2023 07:07:29 -0800
From:   Richard Cochran <richardcochran@...il.com>
To:     Íñigo Huguet <ihuguet@...hat.com>
Cc:     yangbo.lu@....com, mlichvar@...hat.com,
        gerhard@...leder-embedded.com, habetsm.xilinx@...il.com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        netdev@...r.kernel.org, ecree.xilinx@...il.com,
        edumazet@...gle.com, Yalin Li <yalli@...hat.com>
Subject: Re: [PATCH net v2] ptp: vclock: use mutex to fix "sleep on atomic"
 bug

On Tue, Feb 21, 2023 at 02:06:16PM +0100, Íñigo Huguet wrote:
> vclocks were using spinlocks to protect access to its timecounter and
> cyclecounter. Access to timecounter/cyclecounter is backed by the same
> driver callbacks that are used for non-virtual PHCs, but the usage of
> the spinlock imposes a new limitation that didn't exist previously: now
> they're called in atomic context so they mustn't sleep.
> 
> Some drivers like sfc or ice may sleep on these callbacks, causing
> errors like "BUG: scheduling while atomic: ptp5/25223/0x00000002"
> 
> Fix it replacing the vclock's spinlock by a mutex. It fix the mentioned
> bug and it doesn't introduce longer delays.

Acked-by: Richard Cochran <richardcochran@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ