[PATCH] md: fix /proc/mdstat refcounting

From: Akinobu Mita
Date: Thu Oct 12 2006 - 01:31:20 EST


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 <neilb@xxxxxxx>
Signed-off-by: Akinbou Mita <akinobu.mita@xxxxxxxxx>

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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/