| Submitter | Herton Ronaldo Krzesinski |
|---|---|
| Date | Feb. 5, 2013, 10:06 p.m. |
| Message ID | <1360102042-10732-58-git-send-email-herton.krzesinski@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/218419/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index eb11369..8563b64 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) unsigned int cpu; struct cpuinfo_x86 *c; + if (!capable(CAP_SYS_RAWIO)) + return -EPERM; + cpu = iminor(file->f_path.dentry->d_inode); if (cpu >= nr_cpu_ids || !cpu_online(cpu)) return -ENXIO; /* No such CPU */