On Thu, Dec 7, 2017 at 1:05 PM, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Thu, Dec 07, 2017 at 11:22:50AM +0100, Jack Wang wrote: >> From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> >> >> commit 0a85e51d37645e9ce57e5e1a30859e07810ed07c upstream. >> >> Patch series "thp: fix few MADV_DONTNEED races" >> >> For MADV_DONTNEED to work properly with huge pages, it's critical to not >> clear pmd intermittently unless you hold down_write(mmap_sem). >> >> Otherwise MADV_DONTNEED can miss the THP which can lead to userspace >> breakage. >> >> See example of such race in commit message of patch 2/4. >> >> All these races are found by code inspection. I haven't seen them >> triggered. I don't think it's worth to apply them to stable@. >> >> This patch (of 4): > > What about all 4 of these? The 4 patches were from here: http://lkml.iu.edu/hypermail/linux/kernel/1703.0/01274.html thp: reduce indentation level in change_huge_pmd() thp: fix MADV_DONTNEED vs. numa balancing race thp: fix MADV_DONTNEED vs. MADV_FREE race (the function exists only since 4.5+ ) thp: fix MADV_DONTNEED vs clear soft dirty race (this one already included since 4.4.63) > > And should this also go into 4.9? I don't want to include fixes into > 4.4-stable without them also being in 4.9-stable, as that would be a > regression for people upgrading. In 4.9, the last 2 were already applied, I will try to backport these 3 commits also to 4.9 stable. > > thanks, > > greg k-h Thanks, -- Jack Wang Linux Kernel Developer ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin