aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:17:02 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:26 -0400
commit38c4c97c62a30aef276663c1128a2051a25ead7d (patch)
treedf839c451aae68b43e280aa2c894206cd1e50d02
parent3e0420f066c632e135939ccf218ae793e02dccd7 (diff)
x86-mce: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index e07e8c068ae0..4ef151633e8b 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -9,6 +9,7 @@
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/smp_lock.h>
12#include <linux/string.h> 13#include <linux/string.h>
13#include <linux/rcupdate.h> 14#include <linux/rcupdate.h>
14#include <linux/kallsyms.h> 15#include <linux/kallsyms.h>
@@ -527,10 +528,12 @@ static int open_exclu; /* already open exclusive? */
527 528
528static int mce_open(struct inode *inode, struct file *file) 529static int mce_open(struct inode *inode, struct file *file)
529{ 530{
531 lock_kernel();
530 spin_lock(&mce_state_lock); 532 spin_lock(&mce_state_lock);
531 533
532 if (open_exclu || (open_count && (file->f_flags & O_EXCL))) { 534 if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
533 spin_unlock(&mce_state_lock); 535 spin_unlock(&mce_state_lock);
536 unlock_kernel();
534 return -EBUSY; 537 return -EBUSY;
535 } 538 }
536 539
@@ -539,6 +542,7 @@ static int mce_open(struct inode *inode, struct file *file)
539 open_count++; 542 open_count++;
540 543
541 spin_unlock(&mce_state_lock); 544 spin_unlock(&mce_state_lock);
545 unlock_kernel();
542 546
543 return nonseekable_open(inode, file); 547 return nonseekable_open(inode, file);
544} 548}