Dan Carpenter 67b69c426a kdb: do a sanity check on the cpu in kdb_per_cpu()
[ Upstream commit b586627e10f57ee3aa8f0cfab0d6f7dc4ae63760 ]

The "whichcpu" comes from argv[3].  The cpu_online() macro looks up the
cpu in a bitmap of online cpus, but if the value is too high then it
could read beyond the end of the bitmap and possibly Oops.

Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:46:34 +01:00
..
2019-05-31 06:47:25 -07:00
2019-12-01 09:14:03 +01:00
2018-08-03 07:50:38 +02:00
2019-12-05 15:38:28 +01:00
2018-08-03 07:50:22 +02:00
2017-08-21 12:47:31 -07:00
2020-01-09 10:17:53 +01:00
2018-05-09 09:51:50 +02:00