tty: n_gsm: fix wrong DLCI release order
authorDaniel Starke <daniel.starke@siemens.com>
Thu, 14 Apr 2022 09:42:14 +0000 (02:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:43 +0000 (09:14 +0200)
commit2484787cde3db0d64120e5a16e27c0fed5b2510e
treeacfa918b223dba4a135aef3bec35802cfbe5f02e
parent0a7fe1a47ca5ed9d48cd7fdd153506937e7d97b3
tty: n_gsm: fix wrong DLCI release order

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