tmp_suning_uos_patched/drivers/xen
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
..
events xen/events: avoid NULL pointer dereference in dom0 on large machines 2015-03-06 13:16:32 +00:00
xen-pciback xen-pciback: limit guest control of command register 2015-03-11 14:34:40 +00:00
xenbus
xenfs
acpi.c
balloon.c xen/balloon: before adding hotplugged memory, set frames to invalid 2015-03-23 15:15:53 +00:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
fallback.c
features.c
gntalloc.c
gntdev.c
grant-table.c
Kconfig x86/xen: prepare p2m list for memory hotplug 2015-03-23 15:14:47 +00:00
Makefile x86/xen: allow privcmd hypercalls to be preempted 2015-02-23 16:30:24 +00:00
manage.c
mcelog.c
pci.c
pcpu.c
platform-pci.c
preempt.c x86/xen: allow privcmd hypercalls to be preempted 2015-02-23 16:30:24 +00:00
privcmd.c x86/xen: allow privcmd hypercalls to be preempted 2015-02-23 16:30:24 +00:00
privcmd.h
swiotlb-xen.c
sys-hypervisor.c
tmem.c cleancache: forbid overriding cleancache_ops 2015-04-14 16:49:03 -07:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-scsiback.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-03-21 11:24:38 -07:00
xen-selfballoon.c
xen-stub.c