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: <CAKMK7uFFpqFy8tksvMxW2X6_gT-Se8Y9Jbtcxun99e4vRSdgQA@mail.gmail.com>
Date:   Thu, 13 Dec 2018 20:06:28 +0100
From:   Daniel Vetter <daniel.vetter@...ll.ch>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>, liumartin@...gle.com,
        Alan Stern <stern@...land.harvard.edu>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] driver core: Add missing dev->bus->need_parent_lock checks

On Thu, Dec 13, 2018 at 7:53 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Thu, Dec 13, 2018 at 07:27:47PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > __device_release_driver() has to check dev->bus->need_parent_lock
> > before dropping the parent lock and acquiring it again as it may
> > attempt to drop a lock that hasn't been acquired or lock a device
> > that shouldn't be locked and create a lock imbalance.
> >
> > Fixes: 8c97a46af04b (driver core: hold dev's parent lock when needed)
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > ---
> >
> > This should go into -stable for everything over 4.18 methinks.
>
> Does this fix Daniel's lockdep splat?

Nah, separate issue. Afaiui bus->need_parent_lock is only set for usb,
I'm unbinding pci devices. I guess the combination of someone
unbinding an usb device through sysfs which also has some device links
attached doesn't happen.

Since I've dug around in this, for this patch here from Rafael:

Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>

Cheers, Daniel

>
> thanks,
>
> greg k-h



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ