Re: [patch] bug in cpuid & msr on nosmp machine
From: Jeff Sipek
Date: Wed May 19 2004 - 21:46:47 EST
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 19 May 2004 12:35, matthieu castet wrote:
> hi,
>
> on monocpu machine (and maybe even on smp machine), when you try to
> acces to a cpu that don't exist (/dev/cpu/1/cpuid), cpuid (msr) call
> cpu_online, but on nosmp machine if the cpu!=0 this procude a BUG();
> So I add a check that verify if the cpu can exist before calling
> cpu_online.
Added a check? I think your patch is reversed.
Jeff.
- - if (cpu >= num_possible_cpus() || !cpu_online(cpu))
+ if (!cpu_online(cpu))
return -ENXIO; /* No such CPU */
- --
Hegh QaQ law'
quvHa'ghach QaQ puS
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFArBuwwFP0+seVj/4RArcUAJwNIuZ6RhDYaHfnLIjKkiyXrXjfgwCgytvY
hpqUVuBbNwragYDMkjNOm4w=
=8DZk
-----END PGP SIGNATURE-----
-
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/