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]
Date:   Tue, 20 Apr 2021 13:57:36 +0200
From:   Steffen Klassert <steffen.klassert@...unet.com>
To:     Sabrina Dubroca <sd@...asysnail.net>
CC:     <netdev@...r.kernel.org>, Juri Lelli <jlelli@...hat.com>,
        Xiumei Mu <xmu@...hat.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH ipsec-next] xfrm: ipcomp: remove unnecessary get_cpu()

On Fri, Apr 16, 2021 at 05:11:46PM +0200, Sabrina Dubroca wrote:
> While testing ipcomp on a realtime kernel, Xiumei reported a "sleeping
> in atomic" bug, caused by a memory allocation while preemption is
> disabled (ipcomp_decompress -> alloc_page -> ... get_page_from_freelist).
> 
> As Sebastian noted [1], this get_cpu() isn't actually needed, since
> ipcomp_decompress() is called in napi context anyway, so BH is already
> disabled.
> 
> This patch replaces get_cpu + per_cpu_ptr with this_cpu_ptr, then
> simplifies the error returns, since there isn't any common operation
> left.
> 
> [1] https://lore.kernel.org/lkml/20190820082810.ixkmi56fp7u7eyn2@linutronix.de/
> 
> Cc: Juri Lelli <jlelli@...hat.com>
> Reported-by: Xiumei Mu <xmu@...hat.com>
> Suggested-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>

Applied, thanks a lot!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ