diff options
Diffstat (limited to 'arch/x86/kernel/msr.c')
-rw-r--r-- | arch/x86/kernel/msr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index a7c5661f8496..4929502c1372 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -174,6 +174,9 @@ static int msr_open(struct inode *inode, struct file *file) | |||
174 | unsigned int cpu; | 174 | unsigned int cpu; |
175 | struct cpuinfo_x86 *c; | 175 | struct cpuinfo_x86 *c; |
176 | 176 | ||
177 | if (!capable(CAP_SYS_RAWIO)) | ||
178 | return -EPERM; | ||
179 | |||
177 | cpu = iminor(file->f_path.dentry->d_inode); | 180 | cpu = iminor(file->f_path.dentry->d_inode); |
178 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) | 181 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) |
179 | return -ENXIO; /* No such CPU */ | 182 | return -ENXIO; /* No such CPU */ |