[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/6] Under conditions of high load and low resources, it was possible for NDIS (in combination with overlying drivers) to send NET_BUFFER_LIST structures containing NULL MDL's for transmission. This resulted in an immediate bugcheck.


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Durrant <xadimgnik@xxxxxxxxx>
  • Date: Wed, 21 Jul 2021 18:20:17 +0100
  • Delivery-date: Wed, 21 Jul 2021 17:20:20 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Coping with NDIS is XENNET's responsibility. Any remedial action should be taken there, not here.

  Paul

On 20/07/2021 14:29, Martin Harvey wrote:
This patch contains the immediate proximate fix for this particular
issue, instead failing the send with STATUS_INVALID_PARAMETER.

Signed-off-by: Martin Harvey <martin.harvey@xxxxxxxxxx>
---
  src/xenvif/transmitter.c | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 724615d..ea1282c 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -5148,13 +5148,17 @@ TransmitterQueuePacket(
      PXENVIF_TRANSMITTER_RING        Ring;
      NTSTATUS                        status;
+ status = STATUS_INVALID_PARAMETER;
+    if (Mdl == NULL)
+        goto fail1;
+
      Frontend = Transmitter->Frontend;
Packet = __TransmitterGetPacket(Transmitter); status = STATUS_NO_MEMORY;
      if (Packet == NULL)
-        goto fail1;
+        goto fail2;
Packet->Mdl = Mdl;
      Packet->Offset = Offset;
@@ -5206,6 +5210,9 @@ TransmitterQueuePacket(
return STATUS_SUCCESS; +fail2:
+    Error("fail2\n");
+
  fail1:
      Error("fail1 (%08x)\n", status);




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.