提交 19ff7fcc 编写于 作者: M 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.
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 dc033621
...@@ -114,6 +114,7 @@ static const struct seq_operations help_debug_ops = { ...@@ -114,6 +114,7 @@ static const struct seq_operations help_debug_ops = {
}; };
const struct file_operations debug_help_fops = { const struct file_operations debug_help_fops = {
.owner = THIS_MODULE,
.open = orangefs_debug_help_open, .open = orangefs_debug_help_open,
.read = seq_read, .read = seq_read,
.release = seq_release, .release = seq_release,
...@@ -121,6 +122,7 @@ const struct file_operations debug_help_fops = { ...@@ -121,6 +122,7 @@ const struct file_operations debug_help_fops = {
}; };
static const struct file_operations kernel_debug_fops = { static const struct file_operations kernel_debug_fops = {
.owner = THIS_MODULE,
.open = orangefs_debug_open, .open = orangefs_debug_open,
.read = orangefs_debug_read, .read = orangefs_debug_read,
.write = orangefs_debug_write, .write = orangefs_debug_write,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册