# Re: \[PATCH 1/2\] zram: fix crashes due to use of cpu hotplug multistate

- From: Luis Chamberlain \<mcgrof@kernel.org\>
- Date: 2021-04-07 14:52:58 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/04/6329943
- Thread: https://ratatoskr.run/linux-block/2021/03/6290618/t.md

```text
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
```
