]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: don't allow writes to swap files
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 20 Aug 2019 14:55:16 +0000 (07:55 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 20 Aug 2019 14:55:16 +0000 (07:55 -0700)
commit11a2a23dcf0bbf5a06918e851978f60c44ab4c73
tree3596eb0d334f04f87088c735748bba8e66a71cad
parentb272d0ffc4b54bef1989509f7341265e9e221196
vfs: don't allow writes to swap files

Don't let userspace write to an active swap file because the kernel
effectively has a long term lease on the storage and things could get
seriously corrupted if we let this happen.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/block_dev.c
include/linux/fs.h
mm/filemap.c
mm/memory.c
mm/mmap.c
mm/swapfile.c