linux/drivers/net/wireless/intel/iwlwifi/fw
Shahar S Matityahu 0ec7bfb26a iwlwifi: dbg_ini: remove redundant dram buffer allocation
There are several flows in that can cause redundant allocation.

In case the driver reaches the maximum amount of blocks allowed, it
allocates the buffer and only then checks if it reached the maximum
amount of blocks and return without freeing the buffer,
causing a memory leak.

Solve this by moving the check of the amount of buffers being used
before the allocation.

In case there was an assert, the apply points are being reused,
causing that for each assert, the driver allocates a new redundant
buffer.

Solve this by adding a new is_alloc field to indicate if the driver
already allocated memory for the requested buffer.

Also, split iwl_fw_dbg_buffer_allocation function into
iwl_fw_dbg_buffer_allocation and iwl_fw_dbg_buffer_apply
to increase the clearity of the flow.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Fixes: d47902f9f7 ("iwlwifi: dbg: add apply point logic")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-02-04 12:28:06 +02:00
..
api iwlwifi: dbg_ini: update ini structs meta doc 2019-02-04 12:27:19 +02:00
acpi.c iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
acpi.h iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE 2018-11-15 23:50:58 +02:00
dbg.c iwlwifi: dbg_ini: remove redundant dram buffer allocation 2019-02-04 12:28:06 +02:00
dbg.h iwlwifi: Fix pre operational dumping flows 2019-02-04 12:27:19 +02:00
debugfs.c iwlwifi: add debugfs to send host command 2018-10-06 10:25:52 +03:00
debugfs.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
error-dump.h iwlwifi: Fix pre operational dumping flows 2019-02-04 12:27:19 +02:00
file.h iwlwifi: mvm: support new format for the beacon notification 2019-02-04 12:27:19 +02:00
img.h iwlwifi: dbg_ini: remove redundant dram buffer allocation 2019-02-04 12:28:06 +02:00
init.c iwlwifi: Fix pre operational dumping flows 2019-02-04 12:27:19 +02:00
notif-wait.c iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
notif-wait.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
paging.c iwlwifi: fw: combine loading of last page block into main copy loop 2018-04-26 15:18:07 +03:00
runtime.h iwlwifi: dbg_ini: remove redundant dram buffer allocation 2019-02-04 12:28:06 +02:00
smem.c iwlwifi: introduce device family 22560 2018-07-26 13:16:14 +03:00