mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
idpf: nullify pointers after they are freed
rss_data->rss_key needs to be nullified after it is freed.
Checks like "if (!rss_data->rss_key)" in the code could fail
if it is not nullified.
Tested: built and booted the kernel.
Fixes: 83f38f210b ("idpf: Fix RSS LUT NULL pointer crash on early ethtool operations")
Signed-off-by: Li Li <boolli@google.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
e403bf4013
commit
bc3b319773
1 changed files with 1 additions and 0 deletions
|
|
@ -1320,6 +1320,7 @@ static struct idpf_vport *idpf_vport_alloc(struct idpf_adapter *adapter,
|
|||
|
||||
free_rss_key:
|
||||
kfree(rss_data->rss_key);
|
||||
rss_data->rss_key = NULL;
|
||||
free_qreg_chunks:
|
||||
idpf_vport_deinit_queue_reg_chunks(adapter->vport_config[idx]);
|
||||
free_vector_idxs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue