Skip to contentSkip to conversation

md: fix /proc/mdstat refcounting

PATCH New Akinobu Mita 1 participant 1 message Oct 12, 2006 MD RAID

lore
Share & tools
lore
#0 lore raw

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.

drivers/md/md.c +1 -0
Index: work-fault-inject/drivers/md/md.c
===================================================================
@@ -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,