public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Driver bind/unbind and __devinit
@ 2005-12-08 21:14 Dmitry Torokhov
  2005-12-08 21:55 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2005-12-08 21:14 UTC (permalink / raw)
  To: LKML; +Cc: Greg Kroah-Hartman

Hi,

Many drivers have their probe routines declared as __devinit which is
a no-op unless CONFIG_HOTPLUG is set. However driver's bind/unbind
attributes are created unconditionally, as fas as I can see. Would not
it cause an oops if someone tries to use these attributes with
CONFIG_HOTPLUG=N? Am I missing something?

Also, unbind implementation does not seem safe - we check the driver
before taking device's semaphore so we risk unbinding wrong driver (in
the unlikely event that we manage to unbind and bind another driver in
another thread).

--
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-12-08 23:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-08 21:14 Driver bind/unbind and __devinit Dmitry Torokhov
2005-12-08 21:55 ` Greg KH
2005-12-08 22:22   ` Dmitry Torokhov
2005-12-08 22:26     ` Greg KH
2005-12-08 23:01       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox