aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpi/mpi2_init.h
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2012-10-08 16:33:14 -0700
committerLinus Torvalds <[email protected]>2012-10-09 16:22:55 +0900
commitec4d9f626d5908b6052c2973f37992f1db52e967 (patch)
treec1c0dd99680061cb506797f37ed319eb2804329f /drivers/scsi/mpt2sas/mpi/mpi2_init.h
parent7ffc0edc49d0df5dac077c1830e2533b27d3a4ed (diff)
mm: fix invalidate_complete_page2() lock ordering
In fuzzing with trinity, lockdep protested "possible irq lock inversion dependency detected" when isolate_lru_page() reenabled interrupts while still holding the supposedly irq-safe tree_lock: invalidate_inode_pages2 invalidate_complete_page2 spin_lock_irq(&mapping->tree_lock) clear_page_mlock isolate_lru_page spin_unlock_irq(&zone->lru_lock) isolate_lru_page() is correct to enable interrupts unconditionally: invalidate_complete_page2() is incorrect to call clear_page_mlock() while holding tree_lock, which is supposed to nest inside lru_lock. Both truncate_complete_page() and invalidate_complete_page() call clear_page_mlock() before taking tree_lock to remove page from radix_tree. I guess invalidate_complete_page2() preferred to test PageDirty (again) under tree_lock before committing to the munlock; but since the page has already been unmapped, its state is already somewhat inconsistent, and no worse if clear_page_mlock() moved up. Reported-by: Sasha Levin <[email protected]> Deciphered-by: Andrew Morton <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Acked-by: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Ying Han <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_init.h')
0 files changed, 0 insertions, 0 deletions