git: 79770fdad6c1 - main - ena: Fix invalid KASSERT test in netmap code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 30 Jun 2022 16:15:44 UTC
The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=79770fdad6c18d968cc122c4294820931cc542e0 commit 79770fdad6c18d968cc122c4294820931cc542e0 Author: Michal Krawczyk <mk@semihalf.com> AuthorDate: 2022-06-10 09:18:13 +0000 Commit: Marcin Wojtas <mw@FreeBSD.org> CommitDate: 2022-06-30 15:32:17 +0000 ena: Fix invalid KASSERT test in netmap code The KASSERT was originally added to ensure that the netmap Rx ring is not NULL, however, it was checking for the opposite. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 481a0ab3c2c2..e1244ffc8a44 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -206,7 +206,7 @@ ena_netmap_free_rx_slot(struct ena_adapter *adapter, struct ena_ring *rx_ring, BUS_DMASYNC_POSTREAD); netmap_unload_map(na, adapter->rx_buf_tag, rx_info->map); - KASSERT(kring->ring == NULL, ("Netmap Rx ring is NULL\n")); + KASSERT(kring->ring != NULL, ("Netmap Rx ring is NULL\n")); slot = &kring->ring->slot[nm_i];