]> git.baikalelectronics.ru Git - kernel.git/commit
vm: fix incorrect unlock error path in madvise_free_huge_pmd
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Jan 2016 02:33:15 +0000 (18:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Jan 2016 02:33:15 +0000 (18:33 -0800)
commit537f4a3b43b60531d0fd435b2dcfa1ef9a97433e
tree924e8cfcb1516b29468696b7384a1a9195806bbb
parent136b5867c131f3c7ca57a51839ff13f9cb75570d
vm: fix incorrect unlock error path in madvise_free_huge_pmd

Commit 6819b660f636 ("mm/huge_memory.c: don't split THP page when
MADV_FREE syscall is called") introduced this new function, but got the
error handling for when pmd_trans_huge_lock() fails wrong.  In the
failure case, the lock has not been taken, and we should not unlock on
the way out.

Cc: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c