mbox series

[0/2] zram: fix few ltp zram02.sh crashes

Message ID 20210306022035.11266-1-mcgrof@kernel.org (mailing list archive)
Headers show
Series zram: fix few ltp zram02.sh crashes | expand

Message

Luis Chamberlain March 6, 2021, 2:20 a.m. UTC
LTP's zram02.sh script can be used to crah your kernel pretty badly.

  cd testcases/kernel/device-drivers/zram
  while true; do PATH=$PATH:$PWD:$PWD/../../../lib/ ./zram02.sh; done

This won't do much, however if you run this in two separate windows
you'll see the kernel become unhappy quite fast. The crux of this
issue was mishandling of cpu hotplug multistate on the zram driver
in consideration for driver unload. However there was still another
long lasting bug present: races with sysfs attributes and driver
unload.

This series fixes these issues.

[0] https://github.com/linux-test-project/ltp.git 

Luis Chamberlain (2):
  zram: fix crashes due to use of cpu hotplug multistate
  zram: fix races of sysfs attribute removal and usage

 drivers/block/zram/zram_drv.c | 82 +++++++++++++++++++++++++++++++----
 1 file changed, 74 insertions(+), 8 deletions(-)