[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yt7cT66p0Bn+aXn5@kroah.com>
Date: Mon, 25 Jul 2022 20:09:19 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Richard Fitzgerald <rf@...nsource.cirrus.com>
Cc: rafael@...nel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, patches@...nsource.cirrus.com
Subject: Re: [PATCH] component: try_module_get() to prevent unloading while
in use
On Mon, Jul 25, 2022 at 05:08:59PM +0100, Richard Fitzgerald wrote:
> Call try_module_get() on a component before attempting to call its
> bind() function, to ensure that a loadable module cannot be
> unloaded while we are executing its bind().
How can bind be called while the module is unloaded?
> If the bind is successful the module_put() is called only after it
> has been unbound. This ensures that the module cannot be unloaded
> while it is in use as an aggregate device.
That's almost never the correct thing to do, what problem is this
solving?
thanks,
greg k-h
Powered by blists - more mailing lists