md: fix /proc/mdstat refcounting
PATCH 1/1 md: fix /proc/mdstat refcounting
I have seen mdadm oops after successfully unloading md module.
This patch privents from unloading md module while mdadm is polling /proc/mdstat.
Cc Neil Brown <[email protected]>
Signed-off-by Akinbou Mita <[email protected]>
drivers/md/md.c +1 -0
@@ -4912,6 +4912,7 @@ static unsigned int mdstat_poll(struct f }static struct file_operations md_seq_fops = { + .owner =THIS_MODULE , .open = md_seq_open, .read = seq_read, .llseek = seq_lseek,