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, 5 Jan 2017 17:15:34 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Jon Hunter <jonathanh@...dia.com>
Cc:     Tony Lindgren <tony@...mide.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: core: Fix panic when pinctrl devices with hogs
 are unregistered

On Thu, Jan 5, 2017 at 4:52 PM, Jon Hunter <jonathanh@...dia.com> wrote:

> Commit df61b366af26 ('pinctrl: core: Use delayed work for hogs')
> deferred part of the registration for pinctrl devices if the pinctrl
> device has hogs. This introduced a window where if the pinctrl device
> with hogs was sucessfully registered, but then unregistered again
> (which could be caused by parent device being probe deferred) before
> the delayed work has chanced to run, then this will cause a kernel
> panic to occur because:
>
> 1. The 'pctldev->p' has not yet been initialised and when unregistering
>    the pinctrl device we only check to see if it is an error value, but
>    now it could also be NULL.
> 2. The pinctrl device may not have been added to the 'pinctrldev_list'
>    list and we don't check to see if it was added before removing.
>
> Fix up the above by checking to see if the 'pctldev->p' pointer is an
> error value or NULL before putting the pinctrl device and verifying
> that the pinctrl device is present in 'pinctrldev_list' before removing.
>
> Fixes: df61b366af26 ('pinctrl: core: Use delayed work for hogs')
>
> Signed-off-by: Jon Hunter <jonathanh@...dia.com>

Oops. Patch applied.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ