Sfoglia il codice sorgente

[PATCH] 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 <neilb@suse.de>
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akinobu Mita 18 anni fa
parent
commit
e24650c2e7
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      drivers/md/md.c

+ 1 - 0
drivers/md/md.c

@@ -4912,6 +4912,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
 }
 
 static struct file_operations md_seq_fops = {
+	.owner		= THIS_MODULE,
 	.open           = md_seq_open,
 	.read           = seq_read,
 	.llseek         = seq_lseek,