mm-hugetlb-fix-race-in-region-tracking.patch removed from -mm tree
Subsystems (2)
[email protected]
maintainerSubject: [merged] mm-hugetlb-fix-race-in-region-tracking.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 04 Apr 2014 12:31:04 -0700
The patch titled
Subject: mm, hugetlb: fix race in region tracking
has been removed from the -mm tree. Its filename was
mm-hugetlb-fix-race-in-region-tracking.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Davidlohr Bueso <[email protected]>
Subject: mm, hugetlb: fix race in region tracking
There is a race condition if we map a same file on different processes. Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex. When we do mmap, we don't grab a hugetlb_instantiation_mutex, but only the, mmap_sem (exclusively). This doesn't prevent other tasks from modifying the region structure, so it can be modified by two processes concurrently.
To solve this, introduce a spinlock to resv_map and make region manipulation function grab it before they do actual work.
---
include/linux/hugetlb.h | 1 mm/hugetlb.c | 58 ++++++++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 20 deletions(-)
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-fix-race-in-region-tracking +1 -0
@@ -27,6 +27,7 @@ struct hugepage_subpool {struct resv_map {struct kref refs; +spinlock_t lock;struct list_head regions; };extern struct resv_map *resv_map_alloc (void );
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-fix-race-in-region-tracking +38 -20
138 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
origin.patch mm-memoryc-update-comment-in-unmap_single_vma.patch mm-per-thread-vma-caching.patch mm-per-thread-vma-caching-fix-3.patch mm-per-thread-vma-caching-fix-4.patch mm-per-thread-vma-caching-fix-5.patch mm-per-thread-vma-caching-fix-6.patch mm-per-thread-vma-caching-fix-6-fix.patch ipccompat-remove-sc_semopm-macro.patch ipc-use-device_initcall.patch