aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_watchdog.c')
-rw-r--r--drivers/char/ipmi/ipmi_watchdog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 654d566ca57c..ed10b741962d 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -35,7 +35,7 @@
35#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
36#include <linux/ipmi.h> 36#include <linux/ipmi.h>
37#include <linux/ipmi_smi.h> 37#include <linux/ipmi_smi.h>
38#include <linux/smp_lock.h> 38#include <linux/mutex.h>
39#include <linux/watchdog.h> 39#include <linux/watchdog.h>
40#include <linux/miscdevice.h> 40#include <linux/miscdevice.h>
41#include <linux/init.h> 41#include <linux/init.h>
@@ -149,6 +149,7 @@
149#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int) 149#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int)
150#endif 150#endif
151 151
152static DEFINE_MUTEX(ipmi_watchdog_mutex);
152static int nowayout = WATCHDOG_NOWAYOUT; 153static int nowayout = WATCHDOG_NOWAYOUT;
153 154
154static ipmi_user_t watchdog_user; 155static ipmi_user_t watchdog_user;
@@ -748,9 +749,9 @@ static long ipmi_unlocked_ioctl(struct file *file,
748{ 749{
749 int ret; 750 int ret;
750 751
751 lock_kernel(); 752 mutex_lock(&ipmi_watchdog_mutex);
752 ret = ipmi_ioctl(file, cmd, arg); 753 ret = ipmi_ioctl(file, cmd, arg);
753 unlock_kernel(); 754 mutex_unlock(&ipmi_watchdog_mutex);
754 755
755 return ret; 756 return ret;
756} 757}
@@ -844,7 +845,6 @@ static int ipmi_open(struct inode *ino, struct file *filep)
844 if (test_and_set_bit(0, &ipmi_wdog_open)) 845 if (test_and_set_bit(0, &ipmi_wdog_open))
845 return -EBUSY; 846 return -EBUSY;
846 847
847 cycle_kernel_lock();
848 848
849 /* 849 /*
850 * Don't start the timer now, let it start on the 850 * Don't start the timer now, let it start on the