LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl
2008-01-10 5:55 [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl Nikanth Karthikesan
@ 2008-01-09 6:05 ` Andi Kleen
2008-01-09 10:20 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2008-01-09 6:05 UTC (permalink / raw)
To: Nikanth Karthikesan; +Cc: Andi Kleen, linux-kernel, kernel-janitors
On Thu, Jan 10, 2008 at 11:25:14AM +0530, Nikanth Karthikesan wrote:
> 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.
Thanks, but I already did that here on my own.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl
2008-01-10 5:55 [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl Nikanth Karthikesan
2008-01-09 6:05 ` Andi Kleen
@ 2008-01-09 10:20 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-01-09 10:20 UTC (permalink / raw)
To: Nikanth Karthikesan
Cc: Andi Kleen, linux-kernel, kernel-janitors, Thomas Gleixner,
H. Peter Anvin
* Nikanth Karthikesan <knikanth@suse.de> wrote:
> 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.
>
> Change the Machine check handler to use unlocked_ioctl instead of
> ioctl handler. Also the mce ioctl handler does not need any lock
> protection.
thanks, applied to x86.git. Mcelog functionality uses cmpxchg so no need
for the BKL there. The ioctl still being BKL is purely historic and it
was never relied on.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl
@ 2008-01-10 5:55 Nikanth Karthikesan
2008-01-09 6:05 ` Andi Kleen
2008-01-09 10:20 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Nikanth Karthikesan @ 2008-01-10 5:55 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, kernel-janitors
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>
---
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c
b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 4b21d29..d3baa62 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -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;
@@ -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 = {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-09 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 5:55 [PATCH] Change x86 Machine check handler to use unlocked_iocl instead of ioctl Nikanth Karthikesan
2008-01-09 6:05 ` Andi Kleen
2008-01-09 10:20 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).