net/ice: fix leak on thread termination
authorDavid Marchand <david.marchand@redhat.com>
Tue, 11 May 2021 11:33:58 +0000 (13:33 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 May 2021 21:40:22 +0000 (23:40 +0200)
commit8eff201b0021a5821cd71149a43805501f9373c1
treec6452b45834cd82eebe4fabc8a7e5c304f738894
parentb8b5dc6b9596a07cbeed03192b41a4befb75acc6
net/ice: fix leak on thread termination

A terminated pthread should be joined or detached so that its associated
resources are released.

The "ice-reset-<vf_id>" threads are used to service some reset task in
the background, but they are never joined by the thread that created
them.
The easiest solution is to detach new threads.

The Windows EAL did not provide a pthread_detach wrapper but there is no
resource to release for Windows threads, so add an empty wrapper.

Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
drivers/net/ice/ice_dcf_parent.c
lib/eal/windows/include/pthread.h