From: Michel Lespinasse Date: Tue, 1 Feb 2011 01:03:41 +0000 (-0800) Subject: mlock: operate on any regions with protection != PROT_NONE X-Git-Tag: v2.6.38-rc4~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdf4c587a793ba87935e38e7f25a9540bc9a7b95;p=pandora-kernel.git mlock: operate on any regions with protection != PROT_NONE As Tao Ma noticed, change 5ecfda0 breaks blktrace. This is because blktrace mmaps a file with PROT_WRITE permissions but without PROT_READ, so my attempt to not unnecessarity break COW during mlock ended up causing mlock to fail with a permission problem. I am proposing to let mlock ignore vma protection in all cases except PROT_NONE. In particular, mlock should not fail for PROT_WRITE regions (as in the blktrace case, which broke at 5ecfda0) or for PROT_EXEC regions (which seem to me like they were always broken). Signed-off-by: Michel Lespinasse Acked-by: Rik van Riel Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed