Dan Carpenter aecf64a4ad 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-29 10:24:24 +01:00
..
2017-09-02 07:07:53 +02:00
2016-04-04 09:46:47 -04:00
2019-05-31 06:48:20 -07:00
2019-11-28 18:28:55 +01:00
2018-08-03 07:55:12 +02:00
2018-08-03 07:55:24 +02:00
2020-01-12 11:24:12 +01:00
2018-05-09 09:50:20 +02:00
2016-09-22 20:00:36 -05:00