Skip to content

Commit

Permalink
crypto: inside-secure - get the backlog before dequeueing the request
Browse files Browse the repository at this point in the history
Get the backlog before dequeuing the request otherwise we'll miss the
first request in line.

Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
atenart authored and herbertx committed Jun 20, 2017
1 parent c5acabd commit b1deb47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/inside-secure/safexcel.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ void safexcel_dequeue(struct safexcel_crypto_priv *priv, int ring)

do {
spin_lock_bh(&priv->ring[ring].queue_lock);
req = crypto_dequeue_request(&priv->ring[ring].queue);
backlog = crypto_get_backlog(&priv->ring[ring].queue);
req = crypto_dequeue_request(&priv->ring[ring].queue);
spin_unlock_bh(&priv->ring[ring].queue_lock);

if (!req)
Expand Down

0 comments on commit b1deb47

Please sign in to comment.