OrangePi_CM5/drivers/net/ethernet/qlogic
Jiasheng Jiang 56b0bbba78 qlcnic: potential dereference null pointer of rx_queue->page_ring
[ Upstream commit 60ec7fcfe76892a1479afab51ff17a4281923156 ]

The return value of kcalloc() needs to be checked.
To avoid dereference of null pointer in case of the failure of alloc.
Therefore, it might be better to change the return type of
qlcnic_sriov_alloc_vlans() and return -ENOMEM when alloc fails and
return 0 the others.
Also, qlcnic_sriov_set_guest_vlan_mode() and __qlcnic_pci_sriov_enable()
should deal with the return value of qlcnic_sriov_alloc_vlans().

Fixes: 154d0c810c ("qlcnic: VLAN enhancement for 84XX adapters")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-29 12:25:56 +01:00
..
netxen netxen_nic: Fix an error handling path in 'netxen_nic_probe()' 2021-06-23 14:42:45 +02:00
qed qed: Fix missing error code in qed_slowpath_start() 2021-10-20 11:45:06 +02:00
qede qede: validate non LSO skb length 2021-12-14 11:32:40 +01:00
qlcnic qlcnic: potential dereference null pointer of rx_queue->page_ring 2021-12-29 12:25:56 +01:00
Kconfig qed: select CONFIG_CRC32 2021-01-17 14:17:02 +01:00
Makefile qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/ 2019-07-23 11:29:40 -07:00
qla3xxx.c net/qla3xxx: fix an error code in ql_adapter_up() 2021-12-14 11:32:43 +01:00
qla3xxx.h net/qla3xxx: Convert to SPDX license identifiers 2020-09-16 14:32:31 +02:00