Re: [2.6.28] NULL pointer dereference at get_stats()

From: Tetsuo Handa
Date: Wed Dec 31 2008 - 00:09:31 EST


Hello.

Frederik Deweerdt wrote:
> Thanks for the thourough testing. I've reviewed the code, and the only
> think that looks weird to me is the case where smp_sanity_check() fails.
> The attached patch is an attempt to correct this, Tetsuo, could you
> test it?
That patch didn't solve.

Below are the results (with that patch applied) with more test cases.

Case | Result | # of virtual CPUs | # of CPUs recognized | Kernel command line
-----+--------+-------------------+----------------------+-----------------------------------------
(1) | OK | 2 | 2 | ro root=LABEL=/
(2) | BUG | 2 | 1 | ro root=LABEL=/ noapic nolapic
(3) | BUG | 2 | 1 | ro root=LABEL=/ noapic nolapic maxcpus=0
(4) | BUG | 2 | 1 | ro root=LABEL=/ noapic nolapic nosmp
(5) | BUG | 2 | 1 | ro root=LABEL=/ maxcpus=0
(6) | BUG | 2 | 1 | ro root=LABEL=/ nosmp
(7) | OK | 1 | 1 | ro root=LABEL=/
(8) | OK | 1 | 1 | ro root=LABEL=/ nolapic noapic
(9) | OK | 1 | 1 | ro root=LABEL=/ nolapic noapic maxcpus=0
(10) | OK | 1 | 1 | ro root=LABEL=/ nolapic noapic nosmp
(11) | OK | 2 | 1 | ro root=LABEL=/ maxcpus=1
(12) | OK | 2 | 2 | ro root=LABEL=/ maxcpus=2
(13) | OK | 2 | 2 | ro root=LABEL=/ maxcpus=4
(14) | BUG | 2 | 1 | ro root=LABEL=/ noapic nolapic maxcpus=1
(15) | OK | 2 | 2 | ro root=LABEL=/ noapic
(16) | BUG | 2 | 1 | ro root=LABEL=/ noapic maxcpus=0
(17) | OK | 2 | 1 | ro root=LABEL=/ noapic maxcpus=1
(18) | OK | 2 | 2 | ro root=LABEL=/ noapic maxcpus=2
(19) | BUG | 2 | 1 | ro root=LABEL=/ nolapic
(20) | BUG | 2 | 1 | ro root=LABEL=/ nolapic maxcpus=0
(21) | BUG | 2 | 1 | ro root=LABEL=/ nolapic maxcpus=1
(22) | BUG | 2 | 1 | ro root=LABEL=/ nolapic maxcpus=2

"# of CPUs recognized" means "grep -c ^processor /proc/cpcinfo".

Well, (2) (19) (22) are obviously wrong. "nolapic" option implies "nosmp" option?

Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/