From: Darrick J. Wong Date: Thu, 14 Aug 2008 22:43:33 +0000 (-0700) Subject: x86, msr: fix NULL pointer deref due to msr_open on nonexistent CPUs X-Git-Tag: v2.6.27-rc4~52^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=967060d00d7ab8e992963a966cd3d18156c02d55;p=pandora-kernel.git 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 Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed