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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + kobject-dont-block-for-each-kobject_uevent-v2.patch added to -mm tree
To: vdavydov@xxxxxxxxxxxxx,cl@xxxxxxxxx,greg@xxxxxxxxx,penberg@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
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 <vdavydov@xxxxxxxxxxxxx>
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 :-(

Signed-off-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/kobject_uevent.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN lib/kobject_uevent.c~kobject-dont-block-for-each-kobject_uevent-v2 lib/kobject_uevent.c
--- a/lib/kobject_uevent.c~kobject-dont-block-for-each-kobject_uevent-v2
+++ a/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 vdavydov@xxxxxxxxxxxxx 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

--
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




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux