]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VirtioNetDxe: fix SignalEvent() call
authorLaszlo Ersek <lersek@redhat.com>
Thu, 12 Sep 2019 21:27:56 +0000 (23:27 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 9 Oct 2019 07:40:10 +0000 (09:40 +0200)
The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*).
Fix the call in the notification function of
"EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket".

This is an actual bug. The reason it's never been triggered is likely that
the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2
itself has zero instances of that, for example.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
OvmfPkg/VirtioNetDxe/Events.c

index 620910774bc5565e20078b2ccd945bb36d76303e..83e96e5e5d91da21c07579716a749d54b13b46ab 100644 (file)
@@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable (
   MemoryFence ();\r
 \r
   if (Dev->RxLastUsed != RxCurUsed) {\r
-    gBS->SignalEvent (&Dev->Snp.WaitForPacket);\r
+    gBS->SignalEvent (Dev->Snp.WaitForPacket);\r
   }\r
 }\r
 \r