summaryrefslogtreecommitdiffstats
path: root/fs/orangefs
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2016-11-16 17:52:19 +0100
committerMike Marshall <hubcap@omnibond.com>2016-11-16 17:52:19 +0100
commit19ff7fcc76e6911a955742b40f85ba1030ccba5e (patch)
tree8e844e7bf2bb21b0d21e0d769e72b6243f7ef2e9 /fs/orangefs
parentorangefs: clean up debugfs (diff)
downloadlinux-19ff7fcc76e6911a955742b40f85ba1030ccba5e.tar.xz
linux-19ff7fcc76e6911a955742b40f85ba1030ccba5e.zip
orangefs: add .owner to debugfs file_operations
Without ".owner = THIS_MODULE" it is possible to crash the kernel by unloading the Orangefs module while someone is reading debugfs files. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs')
-rw-r--r--fs/orangefs/orangefs-debugfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index d484068ca716..38887cc5577f 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -114,6 +114,7 @@ static const struct seq_operations help_debug_ops = {
};
const struct file_operations debug_help_fops = {
+ .owner = THIS_MODULE,
.open = orangefs_debug_help_open,
.read = seq_read,
.release = seq_release,
@@ -121,6 +122,7 @@ const struct file_operations debug_help_fops = {
};
static const struct file_operations kernel_debug_fops = {
+ .owner = THIS_MODULE,
.open = orangefs_debug_open,
.read = orangefs_debug_read,
.write = orangefs_debug_write,