[PATCH v3 0/2] tap-win32: fix multiple tap support

Gal Horowitz posted 2 patches 4 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250924-fix-win32-multiple-taps-v3-0-9335df866c14@gmail.com
Maintainers: Jason Wang <jasowang@redhat.com>, Stefan Weil <sw@weilnetz.de>
There is a newer version of this series
net/tap-win32.c | 44 +++++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 11 deletions(-)
[PATCH v3 0/2] tap-win32: fix multiple tap support
Posted by Gal Horowitz 4 months, 2 weeks ago
Currently when more than one tap is created on Windows, QEMU immediately
crashes with a null-deref since the code incorrectly uses a static global
for the tap state.

Instead, this series allocates a structure for each tap at startup.
We also take care of cleaning up when the tap device is close.

NOTE: Checkpatch has a false positive on the first commit, where it
mistakenly flags a cast before an address-of operator as a bitwise
and operator missing spaces.

Signed-off-by: Gal Horowitz <galush.horowitz@gmail.com>
---
Changes in v3:
- Split to multiple commits
- Link to v2: https://lore.kernel.org/qemu-devel/20250923-fix-win32-multiple-taps-v2-1-d497e5ac446f@gmail.com

Changes in v2:
- Add cleanup of the structure fields
- Terminate the thread before freeing the structure
- Link to v1: https://lore.kernel.org/qemu-devel/20250920-fix-win32-multiple-taps-v1-1-bee41dcc213d@gmail.com

---
Gal Horowitz (2):
      tap-win32: cleanup leaked handles on tap close
      tap-win32: allocate separate tap state for each instance

 net/tap-win32.c | 44 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 11 deletions(-)
---
base-commit: ab8008b231e758e03c87c1c483c03afdd9c02e19
change-id: 20250920-fix-win32-multiple-taps-ed16ccefbd17

Best regards,
-- 
Gal Horowitz <galush.horowitz@gmail.com>
Re: [PATCH v3 0/2] tap-win32: fix multiple tap support
Posted by Gal Horowitz 4 months, 1 week ago
Hey, friendly ping for review.
Patchew: https://patchew.org/QEMU/20250924-fix-win32-multiple-taps-v3-0-9335df866c14@gmail.com/

Best Regards,
Gal Horowitz

On Wed, 24 Sept 2025 at 17:50, Gal Horowitz <galush.horowitz@gmail.com> wrote:
>
> Currently when more than one tap is created on Windows, QEMU immediately
> crashes with a null-deref since the code incorrectly uses a static global
> for the tap state.
>
> Instead, this series allocates a structure for each tap at startup.
> We also take care of cleaning up when the tap device is close.
>
> NOTE: Checkpatch has a false positive on the first commit, where it
> mistakenly flags a cast before an address-of operator as a bitwise
> and operator missing spaces.
>
> Signed-off-by: Gal Horowitz <galush.horowitz@gmail.com>
> ---
> Changes in v3:
> - Split to multiple commits
> - Link to v2: https://lore.kernel.org/qemu-devel/20250923-fix-win32-multiple-taps-v2-1-d497e5ac446f@gmail.com
>
> Changes in v2:
> - Add cleanup of the structure fields
> - Terminate the thread before freeing the structure
> - Link to v1: https://lore.kernel.org/qemu-devel/20250920-fix-win32-multiple-taps-v1-1-bee41dcc213d@gmail.com
>
> ---
> Gal Horowitz (2):
>       tap-win32: cleanup leaked handles on tap close
>       tap-win32: allocate separate tap state for each instance
>
>  net/tap-win32.c | 44 +++++++++++++++++++++++++++++++++-----------
>  1 file changed, 33 insertions(+), 11 deletions(-)
> ---
> base-commit: ab8008b231e758e03c87c1c483c03afdd9c02e19
> change-id: 20250920-fix-win32-multiple-taps-ed16ccefbd17
>
> Best regards,
> --
> Gal Horowitz <galush.horowitz@gmail.com>
>