perf bench numa: Fix type of loop iterator in do_work, it should be 'long'
authorAndreas Herrmann <aherrmann@suse.de>
Thu, 30 Mar 2023 07:42:02 +0000 (09:42 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Apr 2023 12:39:56 +0000 (09:39 -0300)
commit337fa2db04785c60fc3aa736af98ce8358f87d34
treeb7fe2a7d523a52f20e5ea900b7f4b5b9ae3325ef
parent5a892c3da39fae73d008cc43706ff29456fa8cf1
perf bench numa: Fix type of loop iterator in do_work, it should be 'long'

'j' is of type int and start/end are of type 'long'. Thus 'j' might become
negative and cause segfault in access_data(). Fix it by using 'long' for
'j' as well.

Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Andreas Herrmann <aherrmann@suse.de>
Link: https://lore.kernel.org/r/20230330074202.14052-1-aherrmann@suse.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/numa.c