aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorMike Kravetz <[email protected]>2015-11-20 23:57:13 +0000
committerLinus Torvalds <[email protected]>2015-11-21 00:17:32 +0000
commit1817889e3b2cc1db8abb595712095129ff9156c1 (patch)
tree428e4a4217e58b5a2ea89efd46297cfdda65b15c /drivers/fpga/fpga-mgr.c
parentmm/page-writeback.c: initialize m_dirty to avoid compile warning (diff)
downloadkernel-1817889e3b2cc1db8abb595712095129ff9156c1.tar.gz
kernel-1817889e3b2cc1db8abb595712095129ff9156c1.zip
mm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes
Hugh Dickins pointed out problems with the new hugetlbfs fallocate hole punch code. These problems are in the routine remove_inode_hugepages and mostly occur in the case where there are holes in the range of pages to be removed. These holes could be the result of a previous hole punch or simply sparse allocation. The current code could access pages outside the specified range. remove_inode_hugepages handles both hole punch and truncate operations. Page index handling was fixed/cleaned up so that the loop index always matches the page being processed. The code now only makes a single pass through the range of pages as it was determined page faults could not race with truncate. A cond_resched() was added after removing up to PAGEVEC_SIZE pages. Some totally unnecessary code in hugetlbfs_fallocate() that remained from early development was also removed. Tested with fallocate tests submitted here: http://librelist.com/browser//libhugetlbfs/2015/6/25/patch-tests-add-tests-for-fallocate-system-call/ And, some ftruncate tests under development Fixes: b5cec28d36f5 ("hugetlbfs: truncate_hugepages() takes a range of pages") Signed-off-by: Mike Kravetz <[email protected]> Acked-by: Hugh Dickins <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: "Hillf Danton" <[email protected]> Cc: <[email protected]> [4.3] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions