From: Akinobu Mita Date: Tue, 17 Oct 2006 07:09:38 +0000 (-0700) Subject: [PATCH] md: fix /proc/mdstat refcounting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e24650c2e744f99541125a5b023f0d02cad19d14;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Akinbou Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 57fa64f93e5f..f7f19088f3be 100644 --- a/drivers/md/md.c +++ b/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,