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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 1b9a87047817..235fab0bdf79 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -35,6 +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/watchdog.h> 39#include <linux/watchdog.h>
39#include <linux/miscdevice.h> 40#include <linux/miscdevice.h>
40#include <linux/init.h> 41#include <linux/init.h>
@@ -755,9 +756,8 @@ static ssize_t ipmi_write(struct file *file,
755 rv = ipmi_heartbeat(); 756 rv = ipmi_heartbeat();
756 if (rv) 757 if (rv)
757 return rv; 758 return rv;
758 return 1;
759 } 759 }
760 return 0; 760 return len;
761} 761}
762 762
763static ssize_t ipmi_read(struct file *file, 763static ssize_t ipmi_read(struct file *file,
@@ -819,6 +819,8 @@ static int ipmi_open(struct inode *ino, struct file *filep)
819 if (test_and_set_bit(0, &ipmi_wdog_open)) 819 if (test_and_set_bit(0, &ipmi_wdog_open))
820 return -EBUSY; 820 return -EBUSY;
821 821
822 cycle_kernel_lock();
823
822 /* 824 /*
823 * Don't start the timer now, let it start on the 825 * Don't start the timer now, let it start on the
824 * first heartbeat. 826 * first heartbeat.