Skip to contentSkip to conversation

event/sw: fix events mis-identified as needing reorder

PATCH Applied Bruce Richardson 3 participants 3 messages Apr 14, 2017 – Apr 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 event/sw: fix events mis-identified as needing reorder

When taking events from a port, we checked the history list to check if the event needed to be put back in order i.e. originally came from a reordered queue type. The check for reordering involved checking if the reorder buffer entry pointer was null. However, after that pointer was used it was never cleared to null again.

This caused problems when we had mixed reordered and atomic or parallel events, as the events from the latter two queue types were misidentified as needing reordering. This let in some cases to crashes, but mostly led to dropping events, and then application lock-up.

Fixes 617995dfc5b2 ("event/sw: add scheduling logic")
---
 drivers/event/sw/sw_evdev_scheduler.c | 1 +
 1 file changed, 1 insertion(+)
drivers/event/sw/sw_evdev_scheduler.c +1 -0
index e008b51..a333a6f 100644
@@ -448,6 +448,7 @@ __pull_port_lb(struct sw_evdev *sw, uint32_t port_id, int allow_reorder)
 				struct reorder_buffer_entry *rob_entry =
 						hist_entry->rob_entry;
 
+				hist_entry->rob_entry = NULL;
 				/* Although fragmentation not currently
 				 * supported by eventdev API, we support it
 				 * here. Open: How do we alert the user that
Signature · 1 line
2.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines

From: Richardson, Bruce
Sent: Friday, April 14, 2017 4:18 PM
To: Van Haaren, Harry <[email protected]>
Cc: [email protected]; Richardson, Bruce <[email protected]>
Subject: [PATCH] event/sw: fix events mis-identified as needing reorder

When taking events from a port, we checked the history list to check if the event needed to be put back in order i.e. originally came from a reordered queue type. The check for reordering involved checking if the reorder buffer entry pointer was null. However, after that pointer was used it was never cleared to null again.

Quoted 8 lines

This caused problems when we had mixed reordered and atomic or parallel events, as the events from the latter two queue types were misidentified as needing reordering. This let in some cases to crashes, but mostly led to dropping events, and then application lock-up.

Fixes 617995dfc5b2 ("event/sw: add scheduling logic")

+CC Thomas, would you pick this directly to master please, as no next-eventdev will be merged, thanks.

#2 lore raw

14/04/2017 17:28, Van Haaren, Harry:

Quoted 16 lines

From: Richardson, Bruce
Sent: Friday, April 14, 2017 4:18 PM

Quoted 14 lines

When taking events from a port, we checked the history list to check if the
event needed to be put back in order i.e. originally came from a reordered queue type. The check for reordering involved checking if the reorder buffer entry pointer was null. However, after that pointer was used it was never cleared to null again.

This caused problems when we had mixed reordered and atomic or parallel events, as the events from the latter two queue types were misidentified as
needing reordering. This let in some cases to crashes, but mostly led to dropping events, and then application lock-up.

Quoted 8 lines
Quoted 3 lines
Fixes 617995dfc5b2 ("event/sw: add scheduling logic")

+CC Thomas, would you pick this directly to master please, as no next-eventdev will be merged, thanks.

Applied, thanks