linux-stable/drivers/net/hamradio
Meng Tang a8df216630 hamradio: Fix wrong assignment of 'bbc->cfg.loopback'
In file hamradio/baycom_epp.c, the baycom_setmode interface, there
is a problem with improper use of strstr.

Suppose that when modestr="noloopback", both conditions which are
'strstr(modestr,"noloopback")' and 'strstr(modestr,"loopback")'
will be true(not NULL), this lead the bc->cfg.loopback variable
will be first assigned to 0, and then reassigned to 1.

This will cause 'bc->cfg.loopback = 0' will never take effect. That
obviously violates the logic of the code, so adjust the order of
their execution to solve the problem.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220315074851.6456-1-tangmeng@uniontech.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-03-16 19:17:49 -07:00
..
6pack.c drivers: hamradio: 6pack: fix UAF bug caused by mod_timer() 2022-02-18 10:58:17 +00:00
baycom_epp.c hamradio: Fix wrong assignment of 'bbc->cfg.loopback' 2022-03-16 19:17:49 -07:00
baycom_par.c hamradio: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
baycom_ser_fdx.c hamradio: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
baycom_ser_hdx.c hamradio: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
bpqether.c hamradio: use dev_addr_set() for setting device address 2021-10-13 09:41:37 -07:00
dmascc.c net: hamradio: fix compliation error 2022-03-02 09:47:38 -08:00
hdlcdrv.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
Kconfig dmascc: add CONFIG_VIRT_TO_BUS dependency 2021-09-28 13:12:07 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mkiss.c TTY/Serial driver updates for 5.17-rc1 2022-01-12 11:21:52 -08:00
scc.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
yam.c yam: fix a memory leak in yam_siocdevprivate() 2022-01-25 11:04:55 +00:00
z8530.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00