diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2015-11-26 18:32:31 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-11-27 09:06:39 +0900 |
commit | 56a12abc1df1a019327c8958f6346f53935ec3fc (patch) | |
tree | 8739522421d9b775ece7bd5d107490c2772f0410 /kexec/arch/i386/kexec-x86-common.c | |
parent | 0e1030b345b9e7c1c64b85dde32a282a19b825f0 (diff) |
kexec: fix mmap return code handling
When mmap fails, MAP_FAILED (that is, (void *) -1) is returned. Currently
we assume that NULL is returned. Fix this and add the MAP_FAILED check.
Fixes: 95741713e790 ("kexec/s390x: use mmap instead of read for slurp_file")
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386/kexec-x86-common.c')
0 files changed, 0 insertions, 0 deletions