Patch "tty: n_gsm: fix flow control handling in tx path" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tty: n_gsm: fix flow control handling in tx path

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tty-n_gsm-fix-flow-control-handling-in-tx-path.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b1f19dddab52e801f4265ecae96c13184fd7af42
Author: Daniel Starke <daniel.starke@xxxxxxxxxxx>
Date:   Thu Jul 7 13:32:22 2022 +0200

    tty: n_gsm: fix flow control handling in tx path
    
    [ Upstream commit 59ff0680ecbfec742b1e0381e7cc46b41eb06647 ]
    
    The current implementation constipates all transmission paths during flow
    control except for flow control frames. However, these may not be located
    at the beginning of the transmission queue of the control channel.
    Ensure that flow control frames in the transmission queue for the control
    channel are always handled even if constipated by skipping through other
    messages.
    
    Fixes: 0af021678d5d ("tty: n_gsm: fix deadlock and link starvation in outgoing data path")
    Signed-off-by: Daniel Starke <daniel.starke@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220707113223.3685-3-daniel.starke@xxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 8b8c7312935f..7749de4f269a 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -891,7 +891,7 @@ static int gsm_data_kick(struct gsm_mux *gsm)
 	/* Serialize control messages and control channel messages first */
 	list_for_each_entry_safe(msg, nmsg, &gsm->tx_ctrl_list, list) {
 		if (gsm->constipated && !gsm_is_flow_ctrl_msg(msg))
-			return -EAGAIN;
+			continue;
 		ret = gsm_send_packet(gsm, msg);
 		switch (ret) {
 		case -ENOSPC:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux