Re: [3.8 Regression] backporting "[PATCH stable pre 3.9] mm, gup: close FOLL MAP_PRIVATE race"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 20-10-16 23:39:39, Brian Norris wrote:
> (Preface: this wasn't a clean backport, I'm a bit under the weather, and
> it's getting late here. So forgive me if my head's not on straight.)
> 
> Hi,
> 
> I'm not sure the best way to report this, but the Chrome OS test
> infrastructure noticed some problems when testing the following patch
> backported to our 3.8 kernels:
> 
> http://www.spinics.net/lists/stable/msg147998.html
> 
> Specifically (if you can hold your nose and stand Gerrit), this change:
> 
> https://chromium-review.googlesource.com/#/c/401041/

This is not correct. You have
https://chromium-review.googlesource.com/#/c/401041/2/mm/memory.c

f ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, page, flags)) {
		pte_unmap_unlock(ptep, ptl);
		goto no_page;
	}

so you do a double unlock. See how my patch does
+	if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, page, flags)) {
+		pte_unmap_unlock(ptep, ptl);
+		return NULL;
+	}

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]