zram: fix race between zram_reset_device() and disksize_store()
When the ->init_lock is released in zram_reset_device(), disksize_store() can come in and try to allocate meta, but zram_reset_device() is freeing free meta, so cause races. Link: https://lore.kernel.org/linux-block/20210927163805.808907-1-mcgrof@kernel.org/T/#mc617f865a3fa2778e40f317ddf48f6447c20c073 Reported-by:Luis Chamberlain <mcgrof@kernel.org> Reviewed-by:
Luis Chamberlain <mcgrof@kernel.org> Signed-off-by:
Ming Lei <ming.lei@redhat.com> Acked-by:
Minchan Kim <minchan@kernel.org> Link: https://lore.kernel.org/r/20211025025426.2815424-2-ming.lei@redhat.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Loading
Please sign in to comment