aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorDuoming Zhou <[email protected]>2022-10-02 12:07:09 +0800
committerGreg Kroah-Hartman <[email protected]>2022-11-03 04:12:09 +0100
commit7b7dfe4833c70a11cdfa51b38705103bd31eddaa (patch)
treed80da3b1eb400461b320ee3720b797e14e3cdd99 /lib/mpi/mpi-sub-ui.c
parent15743ae50e04aa907131e3ae8d66e9a2964ea232 (diff)
tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send
The function gsm_dlci_t1() is a timer handler that runs in an atomic context, but it calls "kzalloc(..., GFP_KERNEL)" that may sleep. As a result, the sleep-in-atomic-context bug will happen. The process is shown below: gsm_dlci_t1() gsm_dlci_open() gsm_modem_update() gsm_modem_upd_via_msc() gsm_control_send() kzalloc(sizeof(.., GFP_KERNEL) //may sleep This patch changes the gfp_t parameter of kzalloc() from GFP_KERNEL to GFP_ATOMIC in order to mitigate the bug. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Duoming Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions