]> git.baikalelectronics.ru Git - kernel.git/commit
mm/vmpressure.c: fix race in vmpressure_work_fn()
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Dec 2014 23:59:28 +0000 (15:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Dec 2014 01:32:07 +0000 (17:32 -0800)
commit5fc8c348ce31d2e11a41abb1100780027e6ba37c
tree677bb8c059094859904003cb7af01cbee1d9773e
parent93a81464f43429845d94c0ac00957a9c9542f08f
mm/vmpressure.c: fix race in vmpressure_work_fn()

In some android devices, there will be a "divide by zero" exception.
vmpr->scanned could be zero before spin_lock(&vmpr->sr_lock).

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=88051

[akpm@linux-foundation.org: neaten]
Reported-by: ji_ang <ji_ang@163.com>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmpressure.c