remarkable-linux/Documentation/vm
Vladimir Davydov 53d85c9856 cleancache: forbid overriding cleancache_ops
Currently, cleancache_register_ops returns the previous value of
cleancache_ops to allow chaining.  However, chaining, as it is
implemented now, is extremely dangerous due to possible pool id
collisions.  Suppose, a new cleancache driver is registered after the
previous one assigned an id to a super block.  If the new driver assigns
the same id to another super block, which is perfectly possible, we will
have two different filesystems using the same id.  No matter if the new
driver implements chaining or not, we are likely to get data corruption
with such a configuration eventually.

This patch therefore disables the ability to override cleancache_ops
altogether as potentially dangerous.  If there is already cleancache
driver registered, all further calls to cleancache_register_ops will
return EBUSY.  Since no user of cleancache implements chaining, we only
need to make minor changes to the code outside the cleancache core.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Stefan Hengelein <ilendir@googlemail.com>
Cc: Florian Schmaus <fschmaus@gmail.com>
Cc: Andor Daam <andor.daam@googlemail.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-14 16:49:03 -07:00
..
.gitignore
00-INDEX
active_mm.txt
balance
cleancache.txt cleancache: forbid overriding cleancache_ops 2015-04-14 16:49:03 -07:00
frontswap.txt
highmem.txt
hugetlbpage.txt Documentation: vm: Add 1GB large page support information 2014-11-06 15:14:11 -05:00
hwpoison.txt
ksm.txt
numa
numa_memory_policy.txt
overcommit-accounting
page_migration
page_owner.txt Documentation: add new page_owner document 2014-12-13 12:42:48 -08:00
pagemap.txt mm:add KPF_ZERO_PAGE flag for /proc/kpageflags 2015-02-11 17:06:00 -08:00
remap_file_pages.txt mm: replace remap_file_pages() syscall with emulation 2015-02-10 14:30:30 -08:00
slub.txt
soft-dirty.txt
split_page_table_lock
transhuge.txt
unevictable-lru.txt mm: rename __mlock_vma_pages_range() to populate_vma_page_range() 2015-04-14 16:49:00 -07:00
zswap.txt