aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2020-10-15 20:11:34 -0700
committerLinus Torvalds <[email protected]>2020-10-16 11:11:20 -0700
commitf3c9d0a3fe97a8b05548d27e9a8e7a5e6875004c (patch)
tree7fa8eb0ba014a92baefc85a1e93bd702ce4d2e16
parente130816164e244b692921de49771eeb28205152d (diff)
lib/test_hmm.c: fix an error code in dmirror_allocate_chunk()
This is supposed to return false on failure, not a negative error code. Fixes: 170e38548b81 ("mm/hmm/test: use after free in dmirror_allocate_chunk()") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Ralph Campbell <[email protected]> Cc: Jerome Glisse <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Dan Williams <[email protected]> Link: https://lkml.kernel.org/r/20201010200812.GA1886610@mwanda Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--lib/test_hmm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_hmm.c b/lib/test_hmm.c
index e151a7f10519..80a78877bd93 100644
--- a/lib/test_hmm.c
+++ b/lib/test_hmm.c
@@ -461,7 +461,7 @@ static bool dmirror_allocate_chunk(struct dmirror_device *mdevice,
devmem = kzalloc(sizeof(*devmem), GFP_KERNEL);
if (!devmem)
- return -ENOMEM;
+ return false;
res = request_free_mem_region(&iomem_resource, DEVMEM_CHUNK_SIZE,
"hmm_dmirror");