summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2018-05-26 09:53:13 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-11 16:03:47 +0200
commita1f75c3f3a79147441649ea96d3a0b58e13ded31 (patch)
treebe38db5d907518e27fb4a5ebd333b8c4cf355cf4 /kernel/trace/trace_functions_graph.c
parent216c5fab831e394d4a15e31c20fb5fa46ba24cd8 (diff)
n_tty: Fix stall at n_tty_receive_char_special().
commit 3d63b7e4ae0dc5e02d28ddd2fa1f945defc68d81 upstream. syzbot is reporting stalls at n_tty_receive_char_special() [1]. This is because comparison is not working as expected since ldata->read_head can change at any moment. Mitigate this by explicitly masking with buffer size when checking condition for "while" loops. [1] https://syzkaller.appspot.com/bug?id=3d7481a346958d9469bebbeb0537d5f056bdd6e8 Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reported-by: syzbot <syzbot+18df353d7540aa6b5467@syzkaller.appspotmail.com> Fixes: bc5a5e3f45d04784 ("n_tty: Don't wrap input buffer indices at buffer size") Cc: stable <stable@vger.kernel.org> Cc: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
0 files changed, 0 insertions, 0 deletions