summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2026-05-26 05:27:16 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-05 00:45:07 +0300
commit3e8d8eb8d7f5b1ec3993ad4dbb8140a55f789f90 (patch)
tree56965b17ddda21c021ae5e19159c0acd32c4c5ae /include/linux
parent29a1ea41456b79d657e5f5deced1239477d03af1 (diff)
downloadlinux-3e8d8eb8d7f5b1ec3993ad4dbb8140a55f789f90.tar.xz
zram: do not leak blk idx at the end of writeback
zram_writeback_slots() loop can terminate with valid reserved backing device blk_idx. The problem is that cleanup code doesn't release that reserved blk_idx before zram_writeback_slots() returns, which leads to blk_idx leak (it becomes permanently busy and can not be used for actual writeback.) This does not lead to any system instabilities, it only means that we can writeback less pages. The scenario is hard to hit in practice as it requires writeabck to race with modification (slot-free or overwrite) of the final post-processing slot. Release reserved but unused blk_idx before returning from zram_writeback_slots(). Link: https://lore.kernel.org/20260526022754.2377730-2-senozhatsky@chromium.org Fixes: f405066a1f0db ("zram: introduce writeback bio batching") Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Suggested-by: Brian Geffon <bgeffon@google.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Minchan Kim <minchan@kernel.org> Cc: Richard Chang <richardycc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions