kernel-hacking-2024-linux-s.../drivers
Paul Fulghum 24ce048b0d tty: synclink_gt: unwind actions in error path of net device open
Resent again, last attempt still altered the plain text.

Zhengchao Shao <shaozhengchao@huawei.com> identified by inspection bugs in the error path of hdlcdev_open() in synclink_gt.c

The function did not fully unwind actions in the error path. The use of try_module_get()/module_put() is unnecessary, potentially hazardous and is removed. The synclink_gt driver is already pinned any point the net device is registered, a requirement for calling this entry point.

The call hdlc_open() to init the generic HDLC layer is moved to after driver level init/checks and proper rollback of previous actions is added. This is a more sensible ordering as the most common error paths are at the driver level and the driver level rollbacks require less processing than hdlc_open()/hdlc_close().

This has been tested with supported hardware.

Signed-off-by:Paul Fulghum <paulkf@microgate.com>

Link: https://lore.kernel.org/r/7599F007-8985-4469-BE00-52BD1530210E@microgate.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-22 17:52:57 +01:00
..
accessibility speakup: replace utils' u_char with unsigned char 2022-11-09 15:25:24 +01:00
acpi platform-drivers-x86 for v6.1-3 2022-11-07 10:19:04 -08:00
amba
android binder: validate alloc->mm in ->mmap() handler 2022-11-09 15:41:27 +01:00
ata ata: libata-core: do not issue non-internal commands once EH is pending 2022-11-12 07:51:06 +09:00
atm
auxdisplay
base
bcma
block block-6.1-2022-11-18 2022-11-18 13:59:45 -08:00
bluetooth
bus
cdrom
char
clk
clocksource clocksource/drivers/hyperv: add data structure for reference TSC MSR 2022-11-03 15:50:28 +00:00
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl cxl/region: Recycle region ids 2022-11-04 16:03:43 -07:00
dax
dca
devfreq
dio
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-08 10:43:57 +05:30
dma-buf
edac
eisa
extcon extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered 2022-11-08 16:45:31 +01:00
firewire
firmware Char/Misc driver fixes for 6.1-rc6 2022-11-18 10:29:25 -08:00
fpga
fsi
gnss
gpio
gpu drm/tegra: Fixes for v6.1-rc6 2022-11-19 06:15:37 +10:00
greybus
hid for-linus-2022111101 2022-11-11 09:03:19 -08:00
hsi
hte
hv
hwmon Revert "hwmon: (pmbus) Add regulator supply into macro" 2022-11-04 16:47:01 -07:00
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input Input updates for v6.1-rc5 2022-11-18 17:56:29 -08:00
interconnect
iommu iommu/vt-d: Set SRE bit only when hardware has SRS cap 2022-11-19 10:46:52 +01:00
ipack
irqchip
isdn mISDN: fix misuse of put_device() in mISDN_register_device() 2022-11-14 10:43:13 +00:00
leds
macintosh
mailbox
mcb
md block-6.1-2022-11-18 2022-11-18 13:59:45 -08:00
media
memory
memstick
message
mfd
misc misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-09 15:40:03 +01:00
mmc mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put() 2022-11-16 17:00:39 +01:00
most
mtd mtd: onenand: omap2: add dependency on GPMC 2022-11-07 16:53:04 +01:00
mux
net net: usb: smsc95xx: fix external PHY reset 2022-11-17 10:38:37 +01:00
nfc
ntb
nubus
nvdimm
nvme block-6.1-2022-11-18 2022-11-18 13:59:45 -08:00
nvmem nvmem: u-boot-env: fix crc32_data_offset on redundant u-boot-env 2022-11-10 18:45:59 +01:00
of
opp
parisc
parport parport_pc: Avoid FIFO port location truncation 2022-11-09 15:40:32 +01:00
pci PCI: hv: Fix the definition of vector in hv_compose_msi_msg() 2022-11-03 15:50:28 +00:00
pcmcia
peci
perf
phy phy: ralink: mt7621-pci: add sentinel to quirks table 2022-11-05 13:01:25 +05:30
pinctrl pinctrl: mediatek: Export debounce time tables 2022-11-15 09:13:59 +01:00
platform platform-drivers-x86 for v6.1-4 2022-11-16 10:36:13 -08:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 SCSI fixes on 20221119 2022-11-19 15:51:22 -08:00
sbus
scsi SCSI fixes on 20221119 2022-11-19 15:51:22 -08:00
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-09 15:40:14 +01:00
slimbus slimbus: qcom-ngd: Fix build error when CONFIG_SLIM_QCOM_NGD_CTRL=y && CONFIG_QCOM_RPROC_COMMON=m 2022-11-10 18:45:40 +01:00
soc soc: imx8m: Enable OCOTP clock before reading the register 2022-11-14 15:52:53 +08:00
soundwire
spi spi: Fixes for v6.1 2022-11-11 09:13:52 -08:00
spmi
ssb
staging Staging driver fix for 6.1-rc6 2022-11-18 12:02:38 -08:00
target scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() 2022-11-17 17:46:16 +00:00
tc
tee
thermal
thunderbolt
tty tty: synclink_gt: unwind actions in error path of net device open 2022-11-22 17:52:57 +01:00
ufs
uio
usb USB-serial fixes for 6.1-rc6 2022-11-17 22:06:28 +01:00
vdpa
vfio vfio/pci: Check the device set open count on reset 2022-11-10 12:03:36 -07:00
vhost
video
virt
virtio
vlynq
w1
watchdog
xen xen: branch for v6.1-rc6 2022-11-16 10:49:06 -08:00
zorro
Kconfig
Makefile