summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2007-05-04 00:54:25 +0200
committerAdrian Bunk <bunk@stusta.de>2007-05-04 00:54:25 +0200
commit4879e0dfe9c9199e55566a6025a729854bb2a00e (patch)
treedae9fb7549555e94c71d41701f67875b04557035 /net
parent7943951f236f91699a634097a70abc35927efeb9 (diff)
holepunch: fix mmap_sem i_mutex deadlock
sys_madvise has down_write of mmap_sem, then madvise_remove calls vmtruncate_range which takes i_mutex and i_alloc_sem: no, we can easily devise deadlocks from that ordering. madvise_remove drop mmap_sem while calling vmtruncate_range: luckily, since madvise_remove doesn't split or merge vmas, it's easy to handle this case with a NULL prev, without restructuring sys_madvise. (Though sad to retake mmap_sem when it's unlikely to be needed, and certainly down_read is sufficient for MADV_REMOVE, unlike the other madvices.) Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions