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>
Fri, 16 Aug 2019 08:12:38 +0000 (10:12 +0200)
commitb9de21575a20a1c252b820555433c48ae978e70d
tree7fd0c28dac5067d1d3613b73ea967d4c3ee018af
parent6b8f93b5a4f78bed2bd8373987cf47614a415c45
staging: android: ion: Bail out upon SIGKILL when allocating memory.

commit 8f9e86ee795971eabbf372e6d804d6b8578287a7 upstream.

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