Skip to content

Commit 872ec64

Browse files
author
David S. Miller
committed
[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>
1 parent b48194b commit 872ec64

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/sbus/char/bbc_envctrl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
#include <linux/kthread.h>
8-
#include <linux/syscalls.h>
98
#include <linux/delay.h>
9+
#include <linux/kmod.h>
1010
#include <asm/oplib.h>
1111
#include <asm/ebus.h>
1212

@@ -195,7 +195,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
195195
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
196196

197197
shutting_down = 1;
198-
if (kernel_execve("/sbin/shutdown", argv, envp) < 0)
198+
if (call_usermodehelper("/sbin/shutdown", argv, envp, 0) < 0)
199199
printk(KERN_CRIT "envctrl: shutdown execution failed\n");
200200
}
201201

‎drivers/sbus/char/envctrl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <linux/delay.h>
2626
#include <linux/ioport.h>
2727
#include <linux/miscdevice.h>
28-
#include <linux/syscalls.h>
28+
#include <linux/kmod.h>
2929

3030
#include <asm/ebus.h>
3131
#include <asm/uaccess.h>
@@ -976,7 +976,7 @@ static void envctrl_do_shutdown(void)
976976

977977
inprog = 1;
978978
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);
980980
if (ret < 0) {
981981
printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n");
982982
inprog = 0; /* unlikely to succeed, but we could try again */

0 commit comments

Comments
 (0)