linux-stable/drivers/net/ethernet/amazon/ena
Arthur Kiyanovski e3f89f91e9 net: ena: fix corruption of dev_idx_to_host_tbl
The function ena_com_ind_tbl_convert_from_device() has an overflow
bug as explained below. Either way, this function is not needed at
all since we don't retrieve the indirection table from the device
at any point which means that this conversion is not needed.

The bug:
The for loop iterates over all io_sq_queues, when passing the actual
number of used queues the io_sq_queues[i].idx equals 0 since they are
uninitialized which results in the following code to be executed till
the end of the loop:

dev_idx_to_host_tbl[0] = i;

This results dev_idx_to_host_tbl[0] in being equal to
ENA_TOTAL_NUM_QUEUES - 1.

Fixes: 1738cd3ed3 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-02-11 17:08:31 -08:00
..
ena_admin_defs.h net: ena: enable the interrupt_moderation in driver_supported_features 2019-09-16 22:06:02 +02:00
ena_com.c net: ena: fix corruption of dev_idx_to_host_tbl 2020-02-11 17:08:31 -08:00
ena_com.h net: ena: fix incorrect default RSS key 2020-02-11 17:08:30 -08:00
ena_common_defs.h net: ena: complete host info to match latest ENA spec 2018-10-11 10:13:50 -07:00
ena_eth_com.c net: ena: clean up indentation issue 2019-09-27 20:32:02 +02:00
ena_eth_com.h net: ena: optimise calculations for CQ doorbell 2019-06-03 13:30:38 -07:00
ena_eth_io_defs.h net: ena: fix indentations in ena_defs for better readability 2018-10-11 10:13:51 -07:00
ena_ethtool.c net: ena: fix incorrectly saving queue numbers when setting RSS indirection table 2020-02-11 17:08:31 -08:00
ena_netdev.c net: ena: fix uses of round_jiffies() 2020-02-11 17:08:30 -08:00
ena_netdev.h net: ena: fix incorrectly saving queue numbers when setting RSS indirection table 2020-02-11 17:08:31 -08:00
ena_pci_id_tbl.h
ena_regs_defs.h net: ena: fix indentations in ena_defs for better readability 2018-10-11 10:13:51 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00