aboutsummaryrefslogtreecommitdiffstats
path: root/lib/overflow_kunit.c
diff options
context:
space:
mode:
authorSergey Senozhatsky <[email protected]>2022-08-16 05:09:06 +0000
committerAndrew Morton <[email protected]>2022-08-28 21:02:44 +0000
commita5d2172180e8f94a8cfc7a7fa0243035629bf8d0 (patch)
treef928252b9aafe2a463ad3aa31457b297ba7fc0fc /lib/overflow_kunit.c
parentbinder_alloc: add missing mmap_lock calls when using the VMA (diff)
downloadkernel-a5d2172180e8f94a8cfc7a7fa0243035629bf8d0.tar.gz
kernel-a5d2172180e8f94a8cfc7a7fa0243035629bf8d0.zip
mm/zsmalloc: do not attempt to free IS_ERR handle
zsmalloc() now returns ERR_PTR values as handles, which zram accidentally can pass to zs_free(). Another bad scenario is when zcomp_compress() fails - handle has default -ENOMEM value, and zs_free() will try to free that "pointer value". Add the missing check and make sure that zs_free() bails out when ERR_PTR() is passed to it. Link: https://lkml.kernel.org/r/[email protected] Fixes: c7e6f17b52e9 ("zsmalloc: zs_malloc: return ERR_PTR on failure") Signed-off-by: Sergey Senozhatsky <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]>, Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/overflow_kunit.c')
0 files changed, 0 insertions, 0 deletions