Thread (3 messages) flat view 3 messages, 3 authors, 2012-11-23

Re: [PATCH v3 3/7] usb: chipidea: usbmisc: fix a potential race condition

From: Sascha Hauer <hidden>
Date: 2012-11-23 07:37:11
Also in: linux-arm-kernel

On Fri, Nov 23, 2012 at 01:36:36PM +0800, Peter Chen wrote:
On Wed, Nov 21, 2012 at 03:06:29PM +0100, Michael Grzeschik wrote:
quoted
From: Marc Kleine-Budde <redacted>

This fixes a potential race condition where the ci13xxx_imx glue code
could be fast enough to call one of the usbmisc_ops before he got a
valid value on the static usbmisc pointer. To fix that we first set
usbmisc, then call usbmisc_set_ops().
usbmisc is subsys_initcall, and cil13xxx_imx is module_init. Any
potential situation that the ci13xxx_imx's probe is ran before the
usbmisc's probe is completed?
Not having looked at the code you are referring to at all I just want
to say that: drivers can be modules (don't know if that's true for
chipidea) and sooner or later we'll probably get devicetree overlays, so
the devicetree nodes might just appear during runtime. Depending on
initcall order is generally not a good idea.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help