Skip to content

Commit

Permalink
x86: change x86 machine check handler to use unlocked_ioctl instead
Browse files Browse the repository at this point in the history
The machine check handler registers ioctl handler that is called
with the BKL held. Changing to register unlocked_ioctl instead.
Also mce ioctl handler does not seem to need any lock protection.

To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org

Change the Machine check handler to use unlocked_ioctl instead of
ioctl handler. Also the mce ioctl handler does not need any lock
protection.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Nikanth Karthikesan authored and Ingo Molnar committed Jan 30, 2008
1 parent f291923 commit c68461b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,7 @@ static unsigned int mce_poll(struct file *file, poll_table *wait)
return 0;
}

static int mce_ioctl(struct inode *i, struct file *f,unsigned int cmd,
unsigned long arg)
static long mce_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
{
int __user *p = (int __user *)arg;

Expand Down Expand Up @@ -664,7 +663,7 @@ static const struct file_operations mce_chrdev_ops = {
.release = mce_release,
.read = mce_read,
.poll = mce_poll,
.ioctl = mce_ioctl,
.unlocked_ioctl = mce_ioctl,
};

static struct miscdevice mce_log_device = {
Expand Down

0 comments on commit c68461b

Please sign in to comment.