2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-14 22:43:17 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-08-11 15:01:02 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 17:53:53 +11:00
|
|
|
|
2011-07-26 16:09:06 -07:00
|
|
|
|
2013-06-27 15:06:14 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-16 09:00:00 +01:00
|
|
|
|
2007-08-14 15:15:12 +02:00
|
|
|
|
|
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
2014-04-10 14:09:31 -07:00
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
2005-11-16 09:00:00 +01:00
|
|
|
|
2014-04-10 14:09:31 -07:00
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
2005-11-16 09:00:00 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-08 22:29:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
2007-07-08 22:29:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-12-20 02:09:39 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 14:11:53 -05:00
|
|
|
|
2008-06-02 11:07:25 +01:00
|
|
|
|
2013-06-27 15:06:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-19 01:40:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-01 21:10:49 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-10-31 17:11:33 -07:00
|
|
|
|
|
|
|
|
|
2009-01-25 15:17:37 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-12-20 02:09:39 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-12-17 23:05:35 -07:00
|
|
|
|
2011-10-31 17:11:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-03 21:31:08 -08:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-11-05 22:24:43 -08:00
|
|
|
|
2007-11-05 13:16:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-14 22:43:17 -07:00
|
|
|
|
2006-11-20 17:07:51 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-09-11 22:29:05 -04:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2010-01-19 02:58:23 +01:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2010-03-30 11:31:25 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-08-14 15:15:12 +02:00
|
|
|
|
kobject: don't block for each kobject_uevent
Currently kobject_uevent has somewhat unpredictable semantics. The
point is, since it may call a usermode helper and wait for it to execute
(UMH_WAIT_EXEC), it is impossible to say for sure what lock dependencies
it will introduce for the caller - strictly speaking it depends on what
fs the binary is located on and the set of locks fork may take. There
are quite a few kobject_uevent's users that do not take this into
account and call it with various mutexes taken, e.g. rtnl_mutex,
net_mutex, which might potentially lead to a deadlock.
Since there is actually no reason to wait for the usermode helper to
execute there, let's make kobject_uevent start the helper asynchronously
with the aid of the UMH_NO_WAIT flag.
Personally, I'm interested in this, because I really want kobject_uevent
to be called under the slab_mutex in the slub implementation as it used
to be some time ago, because it greatly simplifies synchronization and
automatically fixes a kmemcg-related race. However, there was a
deadlock detected on an attempt to call kobject_uevent under the
slab_mutex (see https://lkml.org/lkml/2012/1/14/45), which was reported
to be fixed by releasing the slab_mutex for kobject_uevent.
Unfortunately, there was no information about who exactly blocked on the
slab_mutex causing the usermode helper to stall, neither have I managed
to find this out or reproduce the issue.
BTW, this is not the first attempt to make kobject_uevent use
UMH_NO_WAIT. Previous one was made by commit f520360d93cd ("kobject:
don't block for each kobject_uevent"), but it was wrong (it passed
arguments allocated on stack to async thread) so it was reverted in
05f54c13cd0c ("Revert "kobject: don't block for each kobject_uevent".").
It targeted on speeding up the boot process though.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Greg KH <greg@kroah.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03 14:48:21 -07:00
|
|
|
|
2007-08-14 15:15:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-27 09:36:26 -07:00
|
|
|
|
2009-12-31 14:52:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-14 15:15:12 +02:00
|
|
|
|
2007-07-27 09:36:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-11-02 13:47:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-19 02:58:23 +01:00
|
|
|
|
2007-11-02 13:47:53 +01:00
|
|
|
|
2010-03-30 11:31:25 -07:00
|
|
|
|
2010-05-03 16:23:15 -05:00
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-31 14:52:51 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
2009-12-31 14:52:51 +01:00
|
|
|
|
2007-09-27 14:48:53 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-16 10:11:44 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-10-16 10:11:44 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-11-06 10:36:58 -08:00
|
|
|
|
|
|
|
|
|
2008-07-23 21:27:39 -07:00
|
|
|
|
|
|
|
|
|
2007-11-01 09:29:06 -06:00
|
|
|
|
|
|
|
|
|
2007-11-27 11:28:26 -08:00
|
|
|
|
|
|
|
|
|
2007-11-05 13:16:15 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-12-19 13:01:27 -08:00
|
|
|
|
|
|
|
|
|
2006-11-20 17:07:51 +01:00
|
|
|
|
2005-11-11 05:33:52 +01:00
|
|
|
|
2011-10-31 17:11:33 -07:00
|
|
|
|
|
|
|
|
|
2007-08-12 20:43:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|