[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024100130-turkey-duplicate-d670@gregkh>
Date: Tue, 1 Oct 2024 08:50:15 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: rafael.j.wysocki@...el.com, tj@...nel.org, linux-kernel@...r.kernel.org,
regressions@...ts.linux.dev
Subject: Re: [PATCH] driver core: Fix userspace expectations of uevent_show()
as a probe barrier
On Mon, Sep 30, 2024 at 01:05:13PM -0700, Dan Williams wrote:
> Commit "driver core: Fix uevent_show() vs driver detach race" [1]
> attempted to fix a lockdep report in uevent_show() by making the lookup
> of driver information for a given device lockless. It turns out that
> userspace likely depends on the side-effect of uevent_show() flushing
> device probing, as evidenced by the removal of the lock causing a
> regression initializing USB devices [2].
>
> Introduce a new "locked" type for sysfs attributes that arranges for the
> attribute to be called under the device-lock, but without setting up a
> reverse locking order dependency with the kernfs_get_active() lock.
As this is "only" for the driver core, can you move some of the stuff in
the global .h files to the local ones so that no one else gets the wrong
idea they can use them?
thanks,
greg k-h
Powered by blists - more mailing lists