summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread_map.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2015-10-06 11:00:17 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-06 18:04:59 -0300
commit38349665388fb079fb2bc8c46db9446dd976802a (patch)
tree5b212fd3e5984d2faff65bf79bebc61f97f787c8 /tools/perf/util/thread_map.c
parent1178bfd41f3ab6914eb6884875b776bc3032c9b5 (diff)
downloadblackbird-obmc-linux-38349665388fb079fb2bc8c46db9446dd976802a.tar.gz
blackbird-obmc-linux-38349665388fb079fb2bc8c46db9446dd976802a.zip
perf tools: Fix handling read result using a signed variable
The function can return negative value, assigning it to unsigned variable can cause memory corruption. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/1444122017-16856-1-git-send-email-a.hajda@samsung.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread_map.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud