linux/drivers
Christian Borntraeger 5d0360ee96 rd: fix data corruption on memory pressure
We have seen ramdisk based install systems, where some pages of mapped
libraries and programs were suddendly zeroed under memory pressure.  This
should not happen, as the ramdisk avoids freeing its pages by keeping them
dirty all the time.

It turns out that there is a case, where the VM makes a ramdisk page clean,
without telling the ramdisk driver.  On memory pressure shrink_zone runs
and it starts to run shrink_active_list.  There is a check for
buffer_heads_over_limit, and if true, pagevec_strip is called.
pagevec_strip calls try_to_release_page.  If the mapping has no releasepage
callback, try_to_free_buffers is called.  try_to_free_buffers has now a
special logic for some file systems to make a dirty page clean, if all
buffers are clean.  Thats what happened in our test case.

The simplest solution is to provide a noop-releasepage callback for the
ramdisk driver.  This avoids try_to_free_buffers for ramdisk pages.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:42 -08:00
..
acorn/char
acpi acpi: make ACPI_PROCFS default to y 2007-11-14 18:45:39 -08:00
amba
ata libata: Don't fail device revalidation for bad _GTF methods 2007-11-10 00:31:27 -05:00
atm
auxdisplay
base
block rd: fix data corruption on memory pressure 2007-11-14 18:45:42 -08:00
bluetooth
cdrom
char rtc: fall back to requesting only the ports we actually use 2007-11-14 18:45:41 -08:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma I/OAT: Add support for version 2 of ioatdma device 2007-11-14 18:45:41 -08:00
edac i5000_edac: no need to __stringify() KBUILD_BASENAME 2007-11-14 18:45:41 -08:00
eisa
firewire firewire: fw-sbp2: fix refcounting 2007-11-07 01:59:28 +01:00
firmware
hid
hwmon hwmon: (i5k_amb) Convert macros to C functions 2007-11-08 08:42:47 -05:00
i2c
ide ide: remove stale/incorrect comment from setup-pci.c 2007-11-13 22:09:16 +01:00
ieee1394
infiniband
input
isdn
kvm KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions 2007-11-08 12:05:45 +02:00
leds
lguest lguest_user.c: fix memory leak 2007-11-14 18:45:38 -08:00
macintosh [POWERPC] windfarm: Fix windfarm thread freezer interaction 2007-11-08 14:15:34 +11:00
mca
md raid5: fix unending write sequence 2007-11-14 18:45:39 -08:00
media
message
mfd
misc drivers/misc: Move misplaced pci_dev_put's 2007-11-14 18:45:39 -08:00
mmc Add missing "\n" to log message 2007-11-10 11:59:49 +01:00
mtd
net [NET]: Move unneeded data to initdata section. 2007-11-13 03:23:50 -08:00
nubus
of
oprofile oProfile: oops when profile_pc() returns ~0LU 2007-11-14 18:45:37 -08:00
parisc
parport
pci
pcmcia
pnp
power
ps3
rapidio
rtc rtc-ds1307 exports NVRAM 2007-11-14 18:45:36 -08:00
s390
sbus
scsi
serial serial: only use PNP IRQ if it's valid 2007-11-14 18:45:41 -08:00
sh superhyway: Handle device_register() retval properly. 2007-11-07 11:13:55 +09:00
sn
spi tle62x0 driver stops ignoring read errors 2007-11-14 18:45:42 -08:00
ssb ssb: Fix PCMCIA-host lowlevel bus access 2007-11-10 22:01:53 -08:00
tc
telephony
uio
usb
video video/sis/: fix negative array index 2007-11-14 18:45:38 -08:00
virtio virtio: Force use of power-of-two for descriptor ring sizes 2007-11-12 13:59:40 +11:00
w1 W1: fix memset size error 2007-11-14 18:45:36 -08:00
watchdog
xen
zorro
Kconfig
Makefile