projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a7fe1a
)
tty: n_gsm: fix wrong DLCI release order
author
Daniel Starke
<daniel.starke@siemens.com>
Thu, 14 Apr 2022 09:42:14 +0000
(
02:42
-0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:43 +0000
(09:14 +0200)
commit
deefc58bafb4841df7f0a0d85d89a1c819db9743
upstream.
The current DLCI release order starts with the control channel followed by
the user channels. Reverse this order to keep the control channel open
until all user channels have been released.
Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link:
https://lore.kernel.org/r/20220414094225.4527-9-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c
patch
|
blob
|
history
diff --git
a/drivers/tty/n_gsm.c
b/drivers/tty/n_gsm.c
index a26eba50d58e379f6e8e1887a2f9a70cbd55c4dc..fc10f500f848c76955903087c18d99330a5ebf6d 100644
(file)
--- a/
drivers/tty/n_gsm.c
+++ b/
drivers/tty/n_gsm.c
@@
-2081,8
+2081,8
@@
static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
/* Finish outstanding timers, making sure they are done */
del_timer_sync(&gsm->t2_timer);
- /* Free up any link layer users */
- for (i =
0; i < NUM_DLCI; i++
)
+ /* Free up any link layer users
and finally the control channel
*/
+ for (i =
NUM_DLCI - 1; i >= 0; i--
)
if (gsm->dlci[i])
gsm_dlci_release(gsm->dlci[i]);
mutex_unlock(&gsm->mutex);