[PATCH] setupapi: Avoid race conditions with devnode_table.

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Feb 8 13:47:18 CST 2022


On 2/8/22 13:33, Brendan Shanks wrote:
> Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
> ---
> 
> Fixes a crash where two threads calling SetupDiGetClassDevs() would end
> up in alloc_devnode() at the same time. One thread would start iterating
> through the table after devnode_table_size was set but before
> devnode_table was allocated, and crash.

If we need setupapi to be thread-safe, does it make sense just to put a 
lock around all devinst functions instead?



More information about the wine-devel mailing list