summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2022-08-16 08:09:06 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-08-29 00:02:44 +0300
commita5d2172180e8f94a8cfc7a7fa0243035629bf8d0 (patch)
treef928252b9aafe2a463ad3aa31457b297ba7fc0fc /tools/perf/scripts/python/stackcollapse.py
parent44e602b4e52f70f04620bbbf4fe46ecb40170bde (diff)
downloadlinux-a5d2172180e8f94a8cfc7a7fa0243035629bf8d0.tar.xz
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/20220816050906.2583956-1-senozhatsky@chromium.org Fixes: c7e6f17b52e9 ("zsmalloc: zs_malloc: return ERR_PTR on failure") Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org>, Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions