Darrick J. Wong 967060d00d x86, msr: fix NULL pointer deref due to msr_open on nonexistent CPUs
msr_open tests for someone trying to open a device for a nonexistent CPU.
However, the function always returns 0, not ret like it should, hence
userspace can BUG the kernel trivially.  This bug was introduced by the
cdev lock_kernel pushdown patch last May.

The BUG can be reproduced with these commands:

# mknod fubar c 202 8 <-- pick a number less than NR_CPUS that is not
                          the number of an online CPU
# cat fubar

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-15 13:38:30 +02:00
..
2008-08-01 13:03:49 -07:00
2008-08-12 16:07:28 -07:00
2008-08-12 13:32:09 -07:00
2008-07-26 12:00:11 -07:00
2008-08-07 02:20:57 -04:00
2008-08-07 15:33:36 -07:00
2008-07-30 09:41:45 -07:00
2008-07-26 12:00:09 -07:00