diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_devintf.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index 9eb360ff8cab..d5a5f020810a 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -837,13 +837,25 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd, | |||
837 | return ipmi_ioctl(filep, cmd, arg); | 837 | return ipmi_ioctl(filep, cmd, arg); |
838 | } | 838 | } |
839 | } | 839 | } |
840 | |||
841 | static long unlocked_compat_ipmi_ioctl(struct file *filep, unsigned int cmd, | ||
842 | unsigned long arg) | ||
843 | { | ||
844 | int ret; | ||
845 | |||
846 | mutex_lock(&ipmi_mutex); | ||
847 | ret = compat_ipmi_ioctl(filep, cmd, arg); | ||
848 | mutex_unlock(&ipmi_mutex); | ||
849 | |||
850 | return ret; | ||
851 | } | ||
840 | #endif | 852 | #endif |
841 | 853 | ||
842 | static const struct file_operations ipmi_fops = { | 854 | static const struct file_operations ipmi_fops = { |
843 | .owner = THIS_MODULE, | 855 | .owner = THIS_MODULE, |
844 | .unlocked_ioctl = ipmi_unlocked_ioctl, | 856 | .unlocked_ioctl = ipmi_unlocked_ioctl, |
845 | #ifdef CONFIG_COMPAT | 857 | #ifdef CONFIG_COMPAT |
846 | .compat_ioctl = compat_ipmi_ioctl, | 858 | .compat_ioctl = unlocked_compat_ipmi_ioctl, |
847 | #endif | 859 | #endif |
848 | .open = ipmi_open, | 860 | .open = ipmi_open, |
849 | .release = ipmi_release, | 861 | .release = ipmi_release, |