Skip to content

Commit 7b8410e

Browse files
Li Ligregkh
authored andcommitted
idpf: nullify pointers after they are freed
commit bc3b319 upstream. 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: 83f38f2 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent acf942d commit 7b8410e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ static struct idpf_vport *idpf_vport_alloc(struct idpf_adapter *adapter,
12301230

12311231
free_rss_key:
12321232
kfree(rss_data->rss_key);
1233+
rss_data->rss_key = NULL;
12331234
free_vector_idxs:
12341235
kfree(vport->q_vector_idxs);
12351236
free_vport:

0 commit comments

Comments
 (0)