1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/cavium/liquidio
Tom Seewald dbc97bfd39 net: liquidio: Add missing null pointer checks
The functions send_rx_ctrl_cmd() in both liquidio/lio_main.c and
liquidio/lio_vf_main.c do not check if the call to
octeon_alloc_soft_command() fails and returns a null pointer. Both
functions also return void so errors are not propagated back to the
caller.

Fix these issues by updating both instances of send_rx_ctrl_cmd() to
return an integer rather than void, and have them return -ENOMEM if an
allocation failure occurs. Also update all callers of send_rx_ctrl_cmd()
so that they now check the return value.

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Tom Seewald <tseewald@gmail.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-66-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 18:58:36 +02:00
..
cn23xx_pf_device.c liquidio: Fix wrong return value in cn23xx_get_pf_num() 2020-08-03 15:57:31 -07:00
cn23xx_pf_device.h liquidio: enhanced ethtool --set-channels feature 2018-04-30 09:26:29 -04:00
cn23xx_pf_regs.h liquidio: Fix unintented sign extension of a left shift of a u16 2021-04-07 14:54:49 -07:00
cn23xx_vf_device.c liquidio CN23XX: Remove set but not used variable 'ring_flag' 2018-09-06 15:53:47 -07:00
cn23xx_vf_device.h liquidio: moved wait_for_pending_requests to octeon_network.h 2017-08-14 22:21:39 -07:00
cn23xx_vf_regs.h liquidio CN23XX: VF register definitions 2016-11-30 11:03:08 -05:00
cn66xx_device.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
cn66xx_device.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
cn66xx_regs.h cavium/liquidio: Fix duplicate argument 2021-04-14 14:02:56 -07:00
cn68xx_device.c liquidio: cn68xx: Remove duplicated include 2020-11-02 17:32:13 -08:00
cn68xx_device.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
cn68xx_regs.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
lio_core.c liquidio: Use kzalloc for allocating only one thing 2021-01-05 15:43:41 -08:00
lio_ethtool.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
lio_main.c net: liquidio: Add missing null pointer checks 2021-05-13 18:58:36 +02:00
lio_vf_main.c net: liquidio: Add missing null pointer checks 2021-05-13 18:58:36 +02:00
lio_vf_rep.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
lio_vf_rep.h liquidio: synchronize VF representor names with NIC firmware 2017-11-02 17:04:06 +09:00
liquidio_common.h net/liquidio: Delete non-working LIQUIDIO_PACKAGE check 2020-03-03 17:54:54 -08:00
liquidio_image.h liquidio: allow override of firmware present in flash 2017-09-25 20:25:39 -07:00
Makefile net: liquidio: clean up Makefile for simpler composite object handling 2018-03-26 02:01:27 +09:00
octeon_config.h liquidio: remove obsolete functions and data structures 2018-08-29 20:07:42 -07:00
octeon_console.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
octeon_device.c cavium/liquidio: Use DEFINE_SPINLOCK() for spinlock 2021-01-05 15:43:41 -08:00
octeon_device.h liquidio: remove unused inline functions 2020-04-25 20:42:57 -07:00
octeon_droq.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
octeon_droq.h liquidio: Removed droq lock 2018-09-11 23:37:06 -07:00
octeon_iq.h liquidio: Added delayed work for periodically updating the link statistics. 2018-09-03 19:08:07 -07:00
octeon_mailbox.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
octeon_mailbox.h liquidio: Added ndo_get_vf_stats support 2018-04-20 10:53:46 -04:00
octeon_main.h liquidio: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
octeon_mem_ops.c liquidio: Fix -Wmissing-prototypes warnings for liquidio 2020-09-18 14:52:56 -07:00
octeon_mem_ops.h liquidio: stop using huge static buffer, save 4096k in .data 2017-06-22 11:03:00 -04:00
octeon_network.h liquidio: use list_empty_careful in lio_list_delete_head 2020-06-28 21:46:33 -07:00
octeon_nic.c liquidio: Add spoof checking on a VF MAC address 2018-09-06 15:52:18 -07:00
octeon_nic.h liquidio: change octnic_ctrl_pkt to do synchronous soft commands 2018-08-29 20:07:41 -07:00
request_manager.c liquidio: Replace vmalloc_node + memset with vzalloc_node and use array_size 2020-06-17 15:04:03 -07:00
response_manager.c liquidio: improve soft command handling 2018-08-29 20:07:41 -07:00
response_manager.h liquidio: improve soft command handling 2018-08-29 20:07:41 -07:00