On Fri, Oct 15, 2021 at 08:16:49PM +0800, Ming Lei wrote: > 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() As noted in the other thread, unfortunately this is not enough, and can leave the driver in a bad state. So either more work is needed or my alternative patch can be considered. But I do understand the desire to avoid the mutex on removal, if we can do that great. Luis