Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2
+2
fs/orangefs/orangefs-debugfs.c
··· 114 114 }; 115 115 116 116 const struct file_operations debug_help_fops = { 117 + .owner = THIS_MODULE, 117 118 .open = orangefs_debug_help_open, 118 119 .read = seq_read, 119 120 .release = seq_release, ··· 122 121 }; 123 122 124 123 static const struct file_operations kernel_debug_fops = { 124 + .owner = THIS_MODULE, 125 125 .open = orangefs_debug_open, 126 126 .read = orangefs_debug_read, 127 127 .write = orangefs_debug_write,