Skip to content

Commit

Permalink
ionic: update eid test for overflow
Browse files Browse the repository at this point in the history
Fix up our comparison to better handle a potential (but largely
unlikely) wrap around.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shannon Nelson authored and David S. Miller committed Jul 22, 2020
1 parent 4471b1c commit 3fbc9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_lif.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq,
eid = le64_to_cpu(comp->event.eid);

/* Have we run out of new completions to process? */
if (eid <= lif->last_eid)
if ((s64)(eid - lif->last_eid) <= 0)
return false;

lif->last_eid = eid;
Expand Down

0 comments on commit 3fbc9bb

Please sign in to comment.