diff options
author | Dan Carpenter <[email protected]> | 2020-01-30 22:15:07 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-01-31 10:30:39 -0800 |
commit | 38aeb071b3310866e0e75fec8e5d3c5f0f175cb9 (patch) | |
tree | 07073e33afe6e5bdf8a9de955bc3366150c6e808 /lib/test_overflow.c | |
parent | 45190f01dd402112d3d22c0ddc4152994f9e1e55 (diff) |
zswap: potential NULL dereference on error in init_zswap()
The "pool" pointer can be NULL at the end of the init_zswap(). (We
would allocate a new pool later in that situation)
So in the error handling then we need to make sure pool is a valid
pointer before calling "zswap_pool_destroy(pool);" because that function
dereferences the argument.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 93d4dfa9fbd0 ("mm/zswap.c: add allocation hysteresis if pool limit is hit")
Signed-off-by: Dan Carpenter <[email protected]>
Cc: Vitaly Wool <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions