aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /lib/kobject_uevent.c
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 4e3bd71bd949..9ebf9e20de53 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -29,7 +29,9 @@
29 29
30 30
31u64 uevent_seqnum; 31u64 uevent_seqnum;
32#ifdef CONFIG_UEVENT_HELPER
32char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH; 33char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
34#endif
33#ifdef CONFIG_NET 35#ifdef CONFIG_NET
34struct uevent_sock { 36struct uevent_sock {
35 struct list_head list; 37 struct list_head list;
@@ -109,6 +111,7 @@ static int kobj_bcast_filter(struct sock *dsk, struct sk_buff *skb, void *data)
109} 111}
110#endif 112#endif
111 113
114#ifdef CONFIG_UEVENT_HELPER
112static int kobj_usermode_filter(struct kobject *kobj) 115static int kobj_usermode_filter(struct kobject *kobj)
113{ 116{
114 const struct kobj_ns_type_operations *ops; 117 const struct kobj_ns_type_operations *ops;
@@ -147,6 +150,7 @@ static void cleanup_uevent_env(struct subprocess_info *info)
147{ 150{
148 kfree(info->data); 151 kfree(info->data);
149} 152}
153#endif
150 154
151/** 155/**
152 * kobject_uevent_env - send an uevent with environmental data 156 * kobject_uevent_env - send an uevent with environmental data
@@ -323,6 +327,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
323#endif 327#endif
324 mutex_unlock(&uevent_sock_mutex); 328 mutex_unlock(&uevent_sock_mutex);
325 329
330#ifdef CONFIG_UEVENT_HELPER
326 /* call uevent_helper, usually only enabled during early boot */ 331 /* call uevent_helper, usually only enabled during early boot */
327 if (uevent_helper[0] && !kobj_usermode_filter(kobj)) { 332 if (uevent_helper[0] && !kobj_usermode_filter(kobj)) {
328 struct subprocess_info *info; 333 struct subprocess_info *info;
@@ -347,6 +352,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
347 env = NULL; /* freed by cleanup_uevent_env */ 352 env = NULL; /* freed by cleanup_uevent_env */
348 } 353 }
349 } 354 }
355#endif
350 356
351exit: 357exit:
352 kfree(devpath); 358 kfree(devpath);