linux-stable/drivers/tty
Zhenguo Zhao cd93662137 tty: n_gsm: Modify cr bit value when config requester
When n_gsm config "initiator=0",as requester,gsmld will receive dlci
SABM and DISC control command frame,the CR bit value should be 1.

If cr == 0,it will goto invalid,and it can't send UA response
frame and open requster dlci.

        case SABM|PF:
-               if (cr == 0)
+               if (cr == 0) {
+                       printk("gsm_queue invalid\n");
                        goto invalid;
+                       }

Example,gsmld receive dlc0 SABM command frame:f9 03 3f 01 1c f9
but gsmld goto invalid.

Kernel test log:
[  101.794705] c0 gsmld_receive: 00000000: f9 03 3f 01 1c f9
[  101.803341] c0 <-- 0) C: SABM(P)
[  101.811371] c0 gsm_queue invalid

Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
Link: https://lore.kernel.org/r/1629461872-26965-2-git-send-email-zhenguo6858@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 10:50:27 +02:00
..
hvc tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
ipwireless tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
serdev TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
serial tty: serial: uartlite: Prevent changing fixed parameters 2021-09-14 10:05:32 +02:00
vt TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
amiserial.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
ehv_bytechan.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
goldfish.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
Kconfig This pull request contains the following changes for UML: 2021-07-09 10:19:13 -07:00
Makefile tty: remove broken r3964 line discipline 2021-05-13 16:57:15 +02:00
mips_ejtag_fdc.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
moxa.c tty: moxa: use semi-colons instead of commas 2021-08-26 14:48:07 +02:00
moxa.h tty: fix spelling mistake 2020-06-27 16:21:20 +02:00
mxser.c mxser: use semi-colons instead of commas 2021-08-26 14:48:40 +02:00
n_gsm.c tty: n_gsm: Modify cr bit value when config requester 2021-09-14 10:50:27 +02:00
n_hdlc.c tty: n_hdlc: Fix a little doc-rot in n_hdlc_tty_read() 2021-05-20 17:06:17 +02:00
n_null.c tty: make tty_ldisc_ops a param in tty_unregister_ldisc 2021-05-13 16:57:16 +02:00
n_tty.c tty: drop tty_ldisc_ops::refcount 2021-05-13 16:57:17 +02:00
nozomi.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
pty.c tty: pty: correct function name pty_resize() 2021-05-20 16:33:06 +02:00
synclink_gt.c TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
sysrq.c tty: replace in_irq() with in_hardirq() 2021-08-16 19:01:52 +02:00
tty.h tty: clean include/linux/tty.h up 2021-04-15 10:32:17 +02:00
tty_audit.c tty: audit: move some local functions out of tty.h 2021-04-15 10:24:58 +02:00
tty_baudrate.c tty: tty_baudrate: Fix coding style issues of block comments 2021-05-13 18:29:12 +02:00
tty_buffer.c tty: tty_buffer: Fix incorrectly documented function __tty_buffer_request_room() 2021-05-20 17:06:15 +02:00
tty_io.c tty: Fix data race between tiocsti() and flush_to_ldisc() 2021-08-26 14:51:38 +02:00
tty_ioctl.c tty: make tty_get_{char,frame}_size available 2021-06-15 14:03:26 +02:00
tty_jobctrl.c tty: tty_jobctrl: Fix 2 incorrectly documented functions 2021-05-20 17:06:15 +02:00
tty_ldisc.c tty: tty_ldisc: fix doc warnings in tty_ldisc.c 2021-06-09 14:43:23 +02:00
tty_ldsem.c
tty_mutex.c tty: move some internal tty lock enums and functions out of tty.h 2021-04-15 10:26:58 +02:00
tty_port.c tty: tty_port: Fix coding style issues of block comments 2021-05-13 18:29:13 +02:00
ttynull.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
vcc.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00