Events enqueued to eventdev from the beginning of the circular buffer.
This leads to invalid or already freed events getting enqueued to
circular buffer.

Fixed by enqueuing the events from the head pointer of circular buffer.

Signed-off-by: Ganapati Kundapura <ganapati.kundap...@intel.com>

diff --git a/lib/eventdev/rte_event_crypto_adapter.c 
b/lib/eventdev/rte_event_crypto_adapter.c
index 1c0a22b..fe7e9f9 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -669,7 +669,7 @@ eca_circular_buffer_flush_to_evdev(struct 
event_crypto_adapter *adapter,
        else
                return 0;  /* buffer empty */
 
-       nb_ops_flushed =  eca_ops_enqueue_burst(adapter, ops, n);
+       nb_ops_flushed =  eca_ops_enqueue_burst(adapter, &ops[*headp], n);
        bufp->count -= nb_ops_flushed;
        if (!bufp->count) {
                *headp = 0;
-- 
2.6.4

Reply via email to