[PATCH] The BKL is not necessary in cpuid_openMost of the variables are local to the function. It IS possible that forstruct cpuinfo_x86 *cc could point to the same area. However, this is used read only.

From: John Kacur
Date: Wed Oct 07 2009 - 14:06:12 EST


Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
arch/x86/kernel/cpuid.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 6a52d4b..8bb8401 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -118,8 +118,6 @@ static int cpuid_open(struct inode *inode, struct file *file)
struct cpuinfo_x86 *c;
int ret = 0;

- lock_kernel();
-
cpu = iminor(file->f_path.dentry->d_inode);
if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
ret = -ENXIO; /* No such CPU */
@@ -129,7 +127,6 @@ static int cpuid_open(struct inode *inode, struct file *file)
if (c->cpuid_level < 0)
ret = -EIO; /* CPUID not supported */
out:
- unlock_kernel();
return ret;
}

--
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/