The patch titled drivers/base: do not send KOBJ_ADD uevent if kobject_init_and_add fails has been added to the -mm tree. Its filename is drivers-base-do-not-send-kobj_add-uevent-if-kobject_init_and_add-fails.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/base: do not send KOBJ_ADD uevent if kobject_init_and_add fails From: Xiaotian Feng <dfeng@xxxxxxxxxx> If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD uevent to userspace. Signed-off-by: Xiaotian Feng <dfeng@xxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Cc: Kay Sievers <kay.sievers@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/base/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/base/sys.c~drivers-base-do-not-send-kobj_add-uevent-if-kobject_init_and_add-fails drivers/base/sys.c --- a/drivers/base/sys.c~drivers-base-do-not-send-kobj_add-uevent-if-kobject_init_and_add-fails +++ a/drivers/base/sys.c @@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *s drv->add(sysdev); } mutex_unlock(&sysdev_drivers_lock); + kobject_uevent(&sysdev->kobj, KOBJ_ADD); } - kobject_uevent(&sysdev->kobj, KOBJ_ADD); return error; } _ Patches currently in -mm which might be from dfeng@xxxxxxxxxx are linux-next.patch block-fix-improper-kobject-release-in-blk_integrity_unregister.patch drivers-base-do-not-send-kobj_add-uevent-if-kobject_init_and_add-fails.patch cgroups-make-unlock-sequence-in-cgroup_get_sb-consistent.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html