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.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index a4d57e31f713..82bcdb262a3a 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -659,7 +659,7 @@ static struct watchdog_info ident = {
659 .identity = "IPMI" 659 .identity = "IPMI"
660}; 660};
661 661
662static int ipmi_ioctl(struct inode *inode, struct file *file, 662static int ipmi_ioctl(struct file *file,
663 unsigned int cmd, unsigned long arg) 663 unsigned int cmd, unsigned long arg)
664{ 664{
665 void __user *argp = (void __user *)arg; 665 void __user *argp = (void __user *)arg;
@@ -730,6 +730,19 @@ static int ipmi_ioctl(struct inode *inode, struct file *file,
730 } 730 }
731} 731}
732 732
733static long ipmi_unlocked_ioctl(struct file *file,
734 unsigned int cmd,
735 unsigned long arg)
736{
737 int ret;
738
739 lock_kernel();
740 ret = ipmi_ioctl(file, cmd, arg);
741 unlock_kernel();
742
743 return ret;
744}
745
733static ssize_t ipmi_write(struct file *file, 746static ssize_t ipmi_write(struct file *file,
734 const char __user *buf, 747 const char __user *buf,
735 size_t len, 748 size_t len,
@@ -880,7 +893,7 @@ static const struct file_operations ipmi_wdog_fops = {
880 .read = ipmi_read, 893 .read = ipmi_read,
881 .poll = ipmi_poll, 894 .poll = ipmi_poll,
882 .write = ipmi_write, 895 .write = ipmi_write,
883 .ioctl = ipmi_ioctl, 896 .unlocked_ioctl = ipmi_unlocked_ioctl,
884 .open = ipmi_open, 897 .open = ipmi_open,
885 .release = ipmi_close, 898 .release = ipmi_close,
886 .fasync = ipmi_fasync, 899 .fasync = ipmi_fasync,