Skip to contentSkip to conversation

+ kobject-dont-block-for-each-kobject_uevent-v2.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 18, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + kobject-dont-block-for-each-kobject_uevent-v2.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 18 Feb 2014 12:53:33 -0800

The patch titled
Subject: kobject-dont-block-for-each-kobject_uevent-v2
has been added to the -mm tree. Its filename is
kobject-dont-block-for-each-kobject_uevent-v2.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/kobject-dont-block-for-each-kobject_uevent-v2.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/kobject-dont-block-for-each-kobject_uevent-v2.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 ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Vladimir Davydov <[email protected]>
Subject: kobject-dont-block-for-each-kobject_uevent-v2

I missed that call_usermodehelper_exec() calls cleanup not only on success, but also on failure resulting in a bunch of double frees at early boot when khelper hasn't been initialized yet :-(

---

 lib/kobject_uevent.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/kobject_uevent.c renamed from lib/kobject_uevent.c~kobject-dont-block-for-each-kobject_uevent-v2 +3 -3
diff -puN lib/kobject_uevent.c~kobject-dont-block-for-each-kobject_uevent-v2 lib/kobject_uevent.c
@@ -342,10 +342,10 @@ int kobject_uevent_env(struct kobject *k
 		info = call_usermodehelper_setup(env->argv[0], env->argv,
 						 env->envp, GFP_KERNEL,
 						 NULL, cleanup_uevent_env, env);
-		if (info)
+		if (info) {
 			retval = call_usermodehelper_exec(info, UMH_NO_WAIT);
-		if (!retval)
-			env = NULL;	/* will be freed by cleanup_uevent_env */
+			env = NULL;	/* freed by cleanup_uevent_env */
+		}
 	}
 
 exit:

_

Patches currently in -mm which might be from [email protected] are

mm-vmscan-respect-numa-policy-mask-when-shrinking-slab-on-direct-reclaim.patch mm-vmscan-move-call-to-shrink_slab-to-shrink_zones.patch mm-vmscan-remove-shrink_control-arg-from-do_try_to_free_pages.patch mm-vmscan-shrink_slab-rename-max_pass-freeable.patch kobject-dont-block-for-each-kobject_uevent.patch kobject-dont-block-for-each-kobject_uevent-v2.patch slub-do-not-drop-slab_mutex-for-sysfs_slab_add.patch linux-next.patch