1
0
Fork 0

ionic: update eid test for overflow

[ Upstream commit 3fbc9bb6ca ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Shannon Nelson 2020-07-21 13:34:07 -07:00 committed by Greg Kroah-Hartman
parent 691ae7c87f
commit d000795c9f
1 changed files with 1 additions and 1 deletions

View File

@ -666,7 +666,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;