mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
idpf: fix memory leak in idpf_vport_rel()
Free vport->rx_ptype_lkup in idpf_vport_rel() to avoid leaking memory
during a reset. Reported by kmemleak:
unreferenced object 0xff450acac838a000 (size 4096):
comm "kworker/u258:5", pid 7732, jiffies 4296830044
hex dump (first 32 bytes):
00 00 00 00 00 10 00 00 00 10 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 ................
backtrace (crc 3da81902):
__kmalloc_cache_noprof+0x469/0x7a0
idpf_send_get_rx_ptype_msg+0x90/0x570 [idpf]
idpf_init_task+0x1ec/0x8d0 [idpf]
process_one_work+0x226/0x6d0
worker_thread+0x19e/0x340
kthread+0x10f/0x250
ret_from_fork+0x251/0x2b0
ret_from_fork_asm+0x1a/0x30
Fixes: 0fe45467a1 ("idpf: add create vport and netdev configuration")
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Madhu Chittim <madhu.chittim@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
2e281e1155
commit
f6242b3546
|
|
@ -1082,6 +1082,8 @@ static void idpf_vport_rel(struct idpf_vport *vport)
|
|||
kfree(adapter->vport_config[idx]->req_qs_chunks);
|
||||
adapter->vport_config[idx]->req_qs_chunks = NULL;
|
||||
}
|
||||
kfree(vport->rx_ptype_lkup);
|
||||
vport->rx_ptype_lkup = NULL;
|
||||
kfree(vport);
|
||||
adapter->num_alloc_vports--;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user