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-07-24 10:47:22 -07:00
2008-07-16 10:58:55 +02:00
2008-07-18 14:35:14 +02:00
2008-01-30 13:31:31 +01:00
2008-07-20 09:18:17 +02:00
2008-07-03 08:19:18 +02:00
2008-01-30 13:31:19 +01:00
2008-07-23 18:00:30 -07:00
2008-07-23 17:55:22 -07:00
2008-07-27 21:43:11 +02:00
2008-07-08 13:16:14 +02:00
2008-08-14 13:23:45 +02:00
2008-07-01 11:03:31 +02:00
2008-04-26 17:35:47 +02:00
2008-06-02 11:55:52 +02:00
2008-01-30 13:33:10 +01:00
2008-07-16 10:54:39 +02:00
2008-04-19 19:19:54 +02:00
2008-04-27 12:00:28 +03:00
2008-07-26 12:00:04 -07:00
2008-06-12 21:25:51 +02:00
2008-07-16 12:15:17 -07:00
2008-07-26 12:00:04 -07:00
2008-06-12 18:05:42 -07:00
2008-07-06 14:01:50 +02:00
2008-07-16 12:15:17 -07:00
2008-07-08 12:23:31 +02:00
2008-01-30 13:31:52 +01:00
2008-07-18 18:51:57 +02:00
2008-07-15 22:46:47 +02:00
2008-08-08 15:22:02 -07:00
2008-05-25 08:58:24 +02:00