summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-02 10:00:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-17 13:40:54 -0700
commitb1b8f7b23a2832f46593707627fee765575bcd7c (patch)
treeabea1fd525cb0bf71f5ce448492f417323dc9775 /tools/perf/scripts/python
parentef1bcee5e92e321967aab05e7ed5a91a3f8d78e9 (diff)
ima: always return negative code for error
[ Upstream commit f5e1040196dbfe14c77ce3dfe3b7b08d2d961e88 ] integrity_kernel_read() returns the number of bytes read. If this is a short read then this positive value is returned from ima_calc_file_hash_atfm(). Currently this is only indirectly called from ima_calc_file_hash() and this function only tests for the return value being zero or nonzero and also doesn't forward the return value. Nevertheless there's no point in returning a positive value as an error, so translate a short read into -EINVAL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions