mirror_ubuntu-kernels/drivers/net/ethernet/qlogic
Jiasheng Jiang 60ec7fcfe7 qlcnic: potential dereference null pointer of rx_queue->page_ring
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>
2021-12-18 12:37:12 +00:00
..
netxen net: netxen: fix code indentation 2021-10-29 13:34:42 +01:00
qed net: qed: fix the array may be out of bound 2021-11-26 11:29:20 -08:00
qede qede: validate non LSO skb length 2021-12-03 16:53:37 -08:00
qlcnic qlcnic: potential dereference null pointer of rx_queue->page_ring 2021-12-18 12:37:12 +00:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07: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-07 10:37:10 -08:00
qla3xxx.h net/qla3xxx: Convert to SPDX license identifiers 2020-09-16 14:32:31 +02:00