Commit 872ec6484720e7ddfebb8e15c232fa7ca158ef2e
1 parent
b48194bf0d
[SPARC] {bbc_,}envctrl: Use call_usermodehelper().
We should not be calling kernel_execve() directly and this causes module build failures because kernel_execve() is not exported to modules. Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 4 additions and 4 deletions Side-by-side Diff
drivers/sbus/char/bbc_envctrl.c
... | ... | @@ -5,8 +5,8 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | #include <linux/kthread.h> |
8 | -#include <linux/syscalls.h> | |
9 | 8 | #include <linux/delay.h> |
9 | +#include <linux/kmod.h> | |
10 | 10 | #include <asm/oplib.h> |
11 | 11 | #include <asm/ebus.h> |
12 | 12 | |
... | ... | @@ -195,7 +195,7 @@ |
195 | 195 | printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); |
196 | 196 | |
197 | 197 | shutting_down = 1; |
198 | - if (kernel_execve("/sbin/shutdown", argv, envp) < 0) | |
198 | + if (call_usermodehelper("/sbin/shutdown", argv, envp, 0) < 0) | |
199 | 199 | printk(KERN_CRIT "envctrl: shutdown execution failed\n"); |
200 | 200 | } |
201 | 201 |
drivers/sbus/char/envctrl.c
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | #include <linux/delay.h> |
26 | 26 | #include <linux/ioport.h> |
27 | 27 | #include <linux/miscdevice.h> |
28 | -#include <linux/syscalls.h> | |
28 | +#include <linux/kmod.h> | |
29 | 29 | |
30 | 30 | #include <asm/ebus.h> |
31 | 31 | #include <asm/uaccess.h> |
... | ... | @@ -976,7 +976,7 @@ |
976 | 976 | |
977 | 977 | inprog = 1; |
978 | 978 | printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); |
979 | - ret = kernel_execve("/sbin/shutdown", argv, envp); | |
979 | + ret = call_usermodehelper("/sbin/shutdown", argv, envp, 0); | |
980 | 980 | if (ret < 0) { |
981 | 981 | printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); |
982 | 982 | inprog = 0; /* unlikely to succeed, but we could try again */ |