Skip to content

zram: fix two races

Ming Lei linux-block 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3zram: replace fsync_bdev with sync_blockdevdrivers/block/zram/zram_drv.c+2 -20 replies
2/3zram: simplify handling reset_store/remove vs. opendrivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h+20 -370 replies
3/3zram: avoid race between zram_remove and disksize_storedrivers/block/zram/zram_drv.c+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] zram: fix two races

Hello,

Fixes the following two issues reported by Luis Chamberlain by simpler approach, meantime it is sort of simplification of handling resetting/removing device vs. open().

- zram leak during unloading module, which is one race between resetting and removing device

- zram resource leak in case that disksize_store is done after resetting and before deleting gendisk in zram_remove()

Ming Lei (3):
zram: replace fsync_bdev with sync_blockdev
zram: simplify handling reset_store/remove vs. open
zram: avoid race between zram_remove and disksize_store

 drivers/block/zram/zram_drv.c | 62 ++++++++++++++++-------------------
 drivers/block/zram/zram_drv.h |  4 ---
 2 files changed, 28 insertions(+), 38 deletions(-)
Signature · 1 line
2.31.1