Commit 677294e4 authored by Dominique Martinet's avatar Dominique Martinet Committed by Greg Kroah-Hartman
Browse files

zram: check comp is non-NULL before calling comp_destroy

This is a pre-requisite for the backport of commit 74363ec6 ("zram:
fix uninitialized ZRAM not releasing backing device"), which has been
implemented differently in commit 7ac07a26 ("zram: preparation for
multi-zcomp support") upstream.

We only need to ensure that zcomp_destroy is not called with a NULL
comp, so add this check as the other commit cannot be backported easily.

Stable-dep-of: 74363ec6 ("zram: fix uninitialized ZRAM not releasing backing device")
Link: https://lore.kernel.org/Z3ytcILx4S1v_ueJ@codewreck.org


Suggested-by: default avatarKairui Song <kasong@tencent.com>
Signed-off-by: default avatarDominique Martinet <dominique.martinet@atmark-techno.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 91b493f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment