One of the problems described here:
https://www.mail-archive.com/tech@openbsd.org/msg71790.html
amounts to ix(4) not checking that it allocated a dma map before trying to free 
it.

ok?


Index: if_ix.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ix.c,v
retrieving revision 1.197
diff -u -p -r1.197 if_ix.c
--- if_ix.c     1 Jun 2023 09:05:33 -0000       1.197
+++ if_ix.c     7 Jul 2023 09:22:30 -0000
@@ -3094,8 +3094,11 @@ ixgbe_free_receive_buffers(struct rx_rin
                                m_freem(rxbuf->buf);
                                rxbuf->buf = NULL;
                        }
-                       bus_dmamap_destroy(rxr->rxdma.dma_tag, rxbuf->map);
-                       rxbuf->map = NULL;
+                       if (rxbuf->map != NULL) {
+                               bus_dmamap_destroy(rxr->rxdma.dma_tag,
+                                   rxbuf->map);
+                               rxbuf->map = NULL;
+                       }
                }
                free(rxr->rx_buffers, M_DEVBUF,
                    sc->num_rx_desc * sizeof(struct ixgbe_rx_buf));

Reply via email to