aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-17 16:45:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-17 16:45:57 -0500
commitd46bc34da9bcdab815c4972ad0d433af8eb98c8a (patch)
treef50ae5a5b8feb8d664c5be0fb215d39df8d7a318 /fs
parent5d1904204c99596b50a700f092fe49d78edba400 (diff)
parent19ff7fcc76e6911a955742b40f85ba1030ccba5e (diff)
Merge tag 'for-linus-4.9-rc5-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs fix from Mike Marshall: "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" * tag 'for-linus-4.9-rc5-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: add .owner to debugfs file_operations
Diffstat (limited to 'fs')
-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 = {
114}; 114};
115 115
116const struct file_operations debug_help_fops = { 116const struct file_operations debug_help_fops = {
117 .owner = THIS_MODULE,
117 .open = orangefs_debug_help_open, 118 .open = orangefs_debug_help_open,
118 .read = seq_read, 119 .read = seq_read,
119 .release = seq_release, 120 .release = seq_release,
@@ -121,6 +122,7 @@ const struct file_operations debug_help_fops = {
121}; 122};
122 123
123static const struct file_operations kernel_debug_fops = { 124static const struct file_operations kernel_debug_fops = {
125 .owner = THIS_MODULE,
124 .open = orangefs_debug_open, 126 .open = orangefs_debug_open,
125 .read = orangefs_debug_read, 127 .read = orangefs_debug_read,
126 .write = orangefs_debug_write, 128 .write = orangefs_debug_write,