From: akpm@linux-foundation.org Subject: + kobject-dont-block-for-each-kobject_uevent-v2.patch added to -mm tree Date: Tue, 18 Feb 2014 12:53:33 -0800 Message-ID: <5303c84d.WKZ2qsd4gU/MtbdO%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49375 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbaBRUxe (ORCPT ); Tue, 18 Feb 2014 15:53:34 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, penberg@kernel.org, greg@kroah.com, cl@linux.com, vdavydov@parallels.com Subject: + kobject-dont-block-for-each-kobject_uevent-v2.patch added to -mm tree To: vdavydov@parallels.com,cl@linux.com,greg@kroah.com,penberg@kernel.org From: akpm@linux-foundation.org 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 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 Cc: Greg KH Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton --- 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@parallels.com 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