mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
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>
This commit is contained in:
parent
dc0336214e
commit
19ff7fcc76
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user