]> git.baikalelectronics.ru Git - kernel.git/commit
proc mountinfo: make splice available again
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 27 Dec 2020 18:56:33 +0000 (10:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 27 Dec 2020 20:00:36 +0000 (12:00 -0800)
commit00e59a607889963e43bbc07f3c7e1eca083f7bae
tree3f0bf476ab72b64ed4eff6a6fd101ebbc447e787
parent8a4701985cc47554e972d6b16bc0e69ab43ebdf7
proc mountinfo: make splice available again

Since commit ec25677859f2 ("fs: don't allow splice read/write without
explicit ops") we've required that file operation structures explicitly
enable splice support, rather than falling back to the default handlers.

Most /proc files use the indirect 'struct proc_ops' to describe their
file operations, and were fixed up to support splice earlier in commits
b4960bdf2dcf..ebe8cdb0be84, but the mountinfo files interact with the
VFS directly using their own 'struct file_operations' and got missed as
a result.

This adds the necessary support for splice to work for /proc/*/mountinfo
and friends.

Reported-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
Reported-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=209971
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc_namespace.c