Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate
From: Luis Chamberlain
Date: Wed Apr 07 2021 - 10:52:58 EST
On Tue, Apr 06, 2021 at 06:38:24PM -0700, Minchan Kim wrote:
> To clarify what I understood form the discussion until now:
>
> 1. zram shouldn't allow creating more zram instance during
> rmmod(It causes CPU multistate splat)
Right!
> 2. the private data of gendisk shouldn't destroyed while zram
> sysfs knob is working(it makes system goes crash)
Yup, this is resolved with the bdgrab / bdput on each sysfs knob.
And the last issue is:
3) which patch 2/2 addresed. If a mutex is shared on sysfs
knobs and module removal, you must do try_module_get() to prevent
the deadlock.
Luis