diff options
author | Hugh Dickins <hughd@google.com> | 2011-12-31 11:44:01 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:13:58 -0800 |
commit | 3ce696d12b26c9c1cfedeb194a02606bef2854a4 (patch) | |
tree | 85ea2e7bf2009e4f329a2cd9cec5335b27ad80d6 /drivers/watchdog/hpwdt.c | |
parent | 4347b837ab999865063649cf801ba4f8d7e8748e (diff) | |
download | kernel_samsung_smdk4412-3ce696d12b26c9c1cfedeb194a02606bef2854a4.zip kernel_samsung_smdk4412-3ce696d12b26c9c1cfedeb194a02606bef2854a4.tar.gz kernel_samsung_smdk4412-3ce696d12b26c9c1cfedeb194a02606bef2854a4.tar.bz2 |
futex: Fix uninterruptible loop due to gate_area
commit e6780f7243eddb133cc20ec37fa69317c218b709 upstream.
It was found (by Sasha) that if you use a futex located in the gate
area we get stuck in an uninterruptible infinite loop, much like the
ZERO_PAGE issue.
While looking at this problem, PeterZ realized you'll get into similar
trouble when hitting any install_special_pages() mapping. And are there
still drivers setting up their own special mmaps without page->mapping,
and without special VM or pte flags to make get_user_pages fail?
In most cases, if page->mapping is NULL, we do not need to retry at all:
Linus points out that even /proc/sys/vm/drop_caches poses no problem,
because it ends up using remove_mapping(), which takes care not to
interfere when the page reference count is raised.
But there is still one case which does need a retry: if memory pressure
called shmem_writepage in between get_user_pages_fast dropping page
table lock and our acquiring page lock, then the page gets switched from
filecache to swapcache (and ->mapping set to NULL) whatever the refcount.
Fault it back in to get the page->mapping needed for key->shared.inode.
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/watchdog/hpwdt.c')
0 files changed, 0 insertions, 0 deletions