1
0
Fork 0
remarkable-linux/include
Andrea Arcangeli 4969c1192d mm: fix swapin race condition
The pte_same check is reliable only if the swap entry remains pinned (by
the page lock on swapcache).  We've also to ensure the swapcache isn't
removed before we take the lock as try_to_free_swap won't care about the
page pin.

One of the possible impacts of this patch is that a KSM-shared page can
point to the anon_vma of another process, which could exit before the page
is freed.

This can leave a page with a pointer to a recycled anon_vma object, or
worse, a pointer to something that is no longer an anon_vma.

[riel@redhat.com: changelog help]
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-09 18:57:24 -07:00
..
acpi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-09-07 16:00:17 -07:00
asm-generic Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2010-09-07 14:08:37 -07:00
crypto
drm Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-08-23 18:28:03 -07:00
keys DNS: Separate out CIFS DNS Resolver code 2010-08-05 17:17:51 +00:00
linux mm: fix swapin race condition 2010-09-09 18:57:24 -07:00
math-emu math-emu: correct test for downshifting fraction in _FP_FROM_INT() 2010-07-20 18:45:14 -07:00
media V4L/DVB: cx2341x: convert to the control framework 2010-08-08 23:43:05 -03:00
mtd mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
net tcp: Combat per-cpu skew in orphan tests. 2010-08-25 02:27:49 -07:00
pcmcia pcmcia: use struct resource for PCMCIA devices, part 2 2010-08-03 09:04:16 +02:00
rdma IB: Rename RAW_ETY to RAW_ETHERTYPE 2010-08-04 10:44:19 -07:00
rxrpc
scsi scsi: use __uX types for headers exported to user space 2010-08-11 08:59:01 -07:00
sound ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) 2010-08-18 15:10:59 +02:00
trace Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-24 12:21:49 -07:00
video include: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
xen xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield 2010-08-23 12:01:35 +01:00
Kbuild