diff options
author | Tetsuo Handa <[email protected]> | 2022-08-27 22:47:19 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-08-30 14:35:04 +0200 |
commit | 4bb1a53be85fcb1e24c14860e326a00cdd362c28 (patch) | |
tree | e2d7a9b750c6e4b79b5d46e7b9e7e87c8c2e229d /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | f16c6d2e58a4c2b972efcf9eb12390ee0ba3befb (diff) |
tty: n_gsm: initialize more members at gsm_alloc_mux()
syzbot is reporting use of uninitialized spinlock at gsmld_write() [1], for
commit 32dd59f96924f45e ("tty: n_gsm: fix race condition in gsmld_write()")
allows accessing gsm->tx_lock before gsm_activate_mux() initializes it.
Since object initialization should be done right after allocation in order
to avoid accessing uninitialized memory, move initialization of
timer/work/waitqueue/spinlock from gsmld_open()/gsm_activate_mux() to
gsm_alloc_mux().
Link: https://syzkaller.appspot.com/bug?extid=cf155def4e717db68a12 [1]
Fixes: 32dd59f96924f45e ("tty: n_gsm: fix race condition in gsmld_write()")
Reported-by: syzbot <[email protected]>
Tested-by: syzbot <[email protected]>
Cc: stable <[email protected]>
Acked-by: Jiri Slaby <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions