OpenCloudOS-Kernel/drivers/net
Tong Zhang 6577b9a551 net: arcnet: com20020 fix error handling
There are two issues when handling error case in com20020pci_probe()

1. priv might be not initialized yet when calling com20020pci_remove()
from com20020pci_probe(), since the priv is set at the very last but it
can jump to error handling in the middle and priv remains NULL.
2. memory leak - the net device is allocated in alloc_arcdev but not
properly released if error happens in the middle of the big for loop

[    1.529110] BUG: kernel NULL pointer dereference, address: 0000000000000008
[    1.531447] RIP: 0010:com20020pci_remove+0x15/0x60 [com20020_pci]
[    1.536805] Call Trace:
[    1.536939]  com20020pci_probe+0x3f2/0x48c [com20020_pci]
[    1.537226]  local_pci_probe+0x48/0x80
[    1.539918]  com20020pci_init+0x3f/0x1000 [com20020_pci]

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-14 14:17:48 -07:00
..
appletalk
arcnet net: arcnet: com20020 fix error handling 2021-03-14 14:17:48 -07:00
bonding Revert "net: bonding: fix error return code of bond_neigh_init()" 2021-03-12 12:15:03 -08:00
caif TTY/Serial driver changes for 5.12-rc1 2021-02-20 21:28:04 -08:00
can can: tcan4x5x: tcan4x5x_init(): fix initialization - clear MRAM before entering Normal Mode 2021-03-01 11:45:15 +01:00
dsa net: dsa: mt7530: setup core clock even in TRGMII mode 2021-03-12 16:58:36 -08:00
ethernet Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git 2021-03-12 18:02:28 -08:00
fddi
fjes
hamradio net/hamradio/6pack: remove redundant check in sp_encaps() 2021-03-05 13:00:38 -08:00
hippi
hyperv hv_netvsc: Fix validation in netvsc_linkstatus_callback() 2021-03-01 15:30:52 -08:00
ieee802154
ipa net: ipa: terminate message handler arrays 2021-03-13 14:25:27 -08:00
ipvlan ipvlan: remove h from printk format specifier 2021-01-28 17:47:33 -08:00
mdio net: mdio: Remove of_phy_attach() 2021-02-17 13:17:49 -08:00
mhi net: mhi: Add mbim proto 2021-02-10 15:11:51 -08:00
netdevsim netdevsim: init u64 stats for 32bit hardware 2021-03-04 14:36:26 -08:00
pcs net: pcs: add pcs-lynx 1000BASE-X support 2021-02-06 14:35:21 -08:00
phy net: phy: broadcom: Fix RGMII delays for BCM50160 and BCM50610M 2021-03-12 16:54:57 -08:00
plip
ppp TTY/Serial driver changes for 5.12-rc1 2021-02-20 21:28:04 -08:00
slip
team team: protect features update by RCU to avoid deadlock 2021-01-26 17:08:59 -08:00
usb net: usb: log errors to dmesg/syslog 2021-03-08 11:54:32 -08:00
vmxnet3 vmxnet3: Remove buf_info from device accessible structures 2021-01-29 21:07:03 -08:00
wan net: lapbether: Remove netif_start_queue / netif_stop_queue 2021-03-09 11:03:09 -08:00
wireguard wireguard: queueing: get rid of per-peer ring buffers 2021-02-23 15:59:34 -08:00
wireless wireless-drivers fixes for v5.12 2021-03-03 16:35:24 -08:00
xen-netback Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
Kconfig crypto: mips/poly1305 - enable for all MIPS processors 2021-03-08 11:52:17 +01:00
LICENSE.SRC
Makefile net: mhi: Add dedicated folder 2021-02-10 15:11:51 -08:00
Space.c
bareudp.c udp: call udp_encap_enable for v6 sockets when enabling encap 2021-02-04 18:37:14 -08:00
dummy.c
eql.c
geneve.c geneve: add NETIF_F_FRAGLIST flag for dev features 2021-01-18 19:57:02 -08:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-02-23 11:29:52 -08:00
ifb.c ifb: use new tasklet API 2021-02-02 15:51:18 -08:00
loopback.c Revert "net-loopback: set lo dev initial state to UP" 2021-02-11 13:10:44 -08:00
macsec.c
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: fix dev_ifsioc_locked() race condition 2021-02-11 18:14:19 -08:00
thunderbolt.c
tun.c net: fix dev_ifsioc_locked() race condition 2021-02-11 18:14:19 -08:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-03-06 00:04:52 +01:00
virtio_net.c virtio: features, fixes 2021-02-25 12:21:08 -08:00
vrf.c
vsockmon.c
vxlan.c vxlan: move debug check after netdev unregister 2021-02-23 13:03:02 -08:00
xen-netfront.c drivers: net: xen-netfront: Simplify the calculation of variables 2021-02-04 10:55:24 -08:00