[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVM+u+o=R0M31mqqzmtRN4YvqgUKvJZKfBYtgH15JDh3bQ@mail.gmail.com>
Date: Tue, 17 Jul 2012 09:35:02 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Sebastian Ott <sebott@...ux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: move uevent call to driver_register
On Tue, Jul 3, 2012 at 1:08 AM, Sebastian Ott <sebott@...ux.vnet.ibm.com> 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.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists