diff mbox series

[1/3] eal/windows: fix use of incorrect thread ID

Message ID 20210502023333.30351-1-dmitry.kozliuk@gmail.com (mailing list archive)
State Deferred
Delegated to: Thomas Monjalon
Headers show
Series [1/3] eal/windows: fix use of incorrect thread ID | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk May 2, 2021, 2:33 a.m. UTC
Interrupt thread ID retained its value after interrupt thread finish.
Other interrupt routines could then operate on the wrong thread.
Clear interrupt thread ID before thread termination.

Fixes: 5c016fc0205a ("eal/windows: add interrupt thread skeleton")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/eal_interrupts.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tyler Retzlaff May 4, 2021, 12:08 a.m. UTC | #1
On Sun, May 02, 2021 at 05:33:31AM +0300, Dmitry Kozlyuk wrote:
> Interrupt thread ID retained its value after interrupt thread finish.
> Other interrupt routines could then operate on the wrong thread.
> Clear interrupt thread ID before thread termination.
> 
> Fixes: 5c016fc0205a ("eal/windows: add interrupt thread skeleton")
> Cc: stable@dpdk.org

Acked-by: Tyler Retzlaff <linux.microsoft.com>

> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
>  lib/eal/windows/eal_interrupts.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/eal/windows/eal_interrupts.c b/lib/eal/windows/eal_interrupts.c
> index 1d4cf794df..9cde02b003 100644
> --- a/lib/eal/windows/eal_interrupts.c
> +++ b/lib/eal/windows/eal_interrupts.c
> @@ -46,8 +46,11 @@ eal_intr_thread_main(LPVOID arg __rte_unused)
>  			eal_intr_process(&events[i]);
>  	}
>  
> +	intr_thread = 0;
> +
>  	CloseHandle(intr_iocp);
>  	intr_iocp = NULL;
> +
>  	return NULL;
>  }
>  
> -- 
> 2.29.3
diff mbox series

Patch

diff --git a/lib/eal/windows/eal_interrupts.c b/lib/eal/windows/eal_interrupts.c
index 1d4cf794df..9cde02b003 100644
--- a/lib/eal/windows/eal_interrupts.c
+++ b/lib/eal/windows/eal_interrupts.c
@@ -46,8 +46,11 @@  eal_intr_thread_main(LPVOID arg __rte_unused)
 			eal_intr_process(&events[i]);
 	}
 
+	intr_thread = 0;
+
 	CloseHandle(intr_iocp);
 	intr_iocp = NULL;
+
 	return NULL;
 }