OSDN Git Service

staging: android: ion: Bail out upon SIGKILL when allocating memory.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mon, 1 Jul 2019 10:55:19 +0000 (19:55 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2019 11:11:51 +0000 (13:11 +0200)
commit8f9e86ee795971eabbf372e6d804d6b8578287a7
tree9063b410bef132e8c63c79d1d60f674fae2ebeec
parent92e3e884887c0d278042fbbb6f6c9b41d6addb71
staging: android: ion: Bail out upon SIGKILL when allocating memory.

syzbot found that a thread can stall for minutes inside
ion_system_heap_allocate() after that thread was killed by SIGKILL [1].
Let's check for SIGKILL before doing memory allocation.

[1] https://syzkaller.appspot.com/bug?id=a0e3436829698d5824231251fad9d8e998f94f5e

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@vger.kernel.org>
Reported-by: syzbot <syzbot+8ab2d0f39fb79fe6ca40@syzkaller.appspotmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://lore.kernel.org/r/d088f188-5f32-d8fc-b9a0-0b404f7501cc@I-love.SAKURA.ne.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_page_pool.c