Calling odp_pktio_inq_remdef() causes the pktio's inq_default to be set
to ODP_QUEUE_INVALID, but when the scheduler later polls the pktio it
fails to check the validity of inq_default and ends up passing a bogus
pointer to queue_enq_multi().

Signed-off-by: Stuart Haslam <[email protected]>
---
 platform/linux-generic/odp_packet_io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/platform/linux-generic/odp_packet_io.c 
b/platform/linux-generic/odp_packet_io.c
index 45303f6..73a4be2 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -685,6 +685,9 @@ int pktin_poll(pktio_entry_t *entry)
        if (odp_unlikely(is_free(entry)))
                return -1;
 
+       if (odp_unlikely(entry->s.inq_default == ODP_QUEUE_INVALID))
+               return -1;
+
        num = odp_pktio_recv(entry->s.handle, pkt_tbl, QUEUE_MULTI_MAX);
 
        if (num < 0) {
-- 
2.1.1

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to