Re: [PATCH] driver core: move uevent call to driver_register
From: Greg Kroah-Hartman
Date: Mon Jul 16 2012 - 21:46:00 EST
On Tue, Jul 17, 2012 at 09:35:02AM +0800, Ming Lei wrote:
> On Tue, Jul 3, 2012 at 1:08 AM, Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx> wrote:
>
> > --- a/drivers/base/driver.c
> > +++ b/drivers/base/driver.c
> > @@ -187,6 +187,9 @@ int driver_register(struct device_driver
> > ret = driver_add_groups(drv, drv->groups);
> > if (ret)
> > bus_remove_driver(drv);
> > +
> > + kobject_uevent(&drv->p->kobj, KOBJ_ADD);
>
> You should just send the uevent if 'ret' equals to zero., otherwise
> OOPS may be triggered by kobject_uevent() after the 'drv' has been
> removed.
Ugh, just missed that.
Sebastian, care to send a follow-on patch for this?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/