Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d46bc34d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 5d190420 19ff7fcc
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -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 = {
};
};


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,