misc: tegra-profiler: fix a potential crash
authorIgor Nabirushkin <inabirushkin@nvidia.com>
Wed, 21 Dec 2016 11:42:08 +0000 (15:42 +0400)
committerIgor Nabirushkin <inabirushkin@nvidia.com>
Tue, 8 Aug 2017 14:19:55 +0000 (17:19 +0300)
commitf51a04c17f1c8043619b40f2add64e8301ac3e91
treeb543f84c2f69325483174febe10c953bee613ee1
parent8d534e51b15f2e5454f569174d1555b80c50bb34
misc: tegra-profiler: fix a potential crash

Incorrect cpu number in ioctl can lead to system crash.
Add additional validations to prevent the potential crash.

Bug 1855617

Change-Id: Ib87e3999da9212fbd22f5a46b5615c860c895af5
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1274785
(cherry picked from commit b3738f63c28da9fe8a9acba8a7ef419e70b641fb)
Reviewed-on: http://git-master/r/1302038
(cherry picked from commit 44a80bd56710447a195f04da2e1a8a8810775453)
drivers/misc/tegra-profiler/comm.c