[PATCH] md: fix /proc/mdstat refcounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]>

Index: work-fault-inject/drivers/md/md.c
===================================================================
--- work-fault-inject.orig/drivers/md/md.c
+++ 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,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux