Commit 4dc17b6
Ming Lei
zram: fix uninitialized ZRAM not releasing backing device
JIRA: https://issues.redhat.com/browse/RHEL-77219
commit 74363ec
Author: Kairui Song <kasong@tencent.com>
Date: Tue Dec 10 00:57:16 2024 +0800
zram: fix uninitialized ZRAM not releasing backing device
Setting backing device is done before ZRAM initialization. If we set the
backing device, then remove the ZRAM module without initializing the
device, the backing device reference will be leaked and the device will be
hold forever.
Fix this by always reset the ZRAM fully on rmmod or reset store.
Link: https://lkml.kernel.org/r/20241209165717.94215-3-ryncsn@gmail.com
Fixes: 013bf95 ("zram: add interface to specif backing device")
Signed-off-by: Kairui Song <kasong@tencent.com>
Reported-by: Desheng Wu <deshengwu@tencent.com>
Suggested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>1 parent 3db4052 commit 4dc17b6
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1302 | 1305 | | |
1303 | 1306 | | |
1304 | 1307 | | |
1305 | 1308 | | |
1306 | 1309 | | |
1307 | 1310 | | |
| 1311 | + | |
1308 | 1312 | | |
1309 | 1313 | | |
1310 | 1314 | | |
| |||
2131 | 2135 | | |
2132 | 2136 | | |
2133 | 2137 | | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
2137 | | - | |
2138 | | - | |
2139 | 2138 | | |
2140 | 2139 | | |
2141 | 2140 | | |
| |||
0 commit comments