From 39e53cef88ee92782785a88aee5bc6858103d173 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 19 Nov 2012 03:14:24 +0100 Subject: [PATCH] --- yaml --- r: 344778 b: refs/heads/master c: 1233d588210737ed3696b44c26e71dfa44a6995a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/mprotect.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 3c6b2b80290c..35989c348fa0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7da4d641c58d201c3cc1835c05ca1a7fa26f0856 +refs/heads/master: 1233d588210737ed3696b44c26e71dfa44a6995a diff --git a/trunk/mm/mprotect.c b/trunk/mm/mprotect.c index 1e265be25f85..7c3628a8b486 100644 --- a/trunk/mm/mprotect.c +++ b/trunk/mm/mprotect.c @@ -153,7 +153,9 @@ static unsigned long change_protection_range(struct vm_area_struct *vma, dirty_accountable); } while (pgd++, addr = next, addr != end); - flush_tlb_range(vma, start, end); + /* Only flush the TLB if we actually modified any entries: */ + if (pages) + flush_tlb_range(vma, start, end); return pages; }