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: <CACRpkdZjW9KxkDFx3YatYyCzSd3+Vtw6V+Tzp=9H4S2fMAmQJA@mail.gmail.com>
Date:	Mon, 30 May 2016 17:15:58 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: core: Do not call get_direction in atomic context
 for sleeping gpio

On Tue, May 24, 2016 at 3:18 PM, Laxman Dewangan <ldewangan@...dia.com> wrote:

> When adding the gpiochip, the GPIO HW drivers' callback get_direction()
> get called in atomic context. Some of the GPIO HW drivers can sleep when
> accessing the register and hence it can create the sleeping call in
> atomic context.
>
> Call get_direction() in non-atomic context from gpiochip_add() if GPIO
> HW driver is having sleepable callback i.e. chip->can_sleep = 1.
>
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
>
> ---
> This is found when implementing the get_direction() of max77620 on 20160520
> linux-next.

I chose to send a new patch just moving the lock release before the
direction check. I just sent it with you as Reported-by.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ