mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 22:04:47 +08:00
ionic: update eid test for overflow
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>
This commit is contained in:
parent
4471b1c13a
commit
3fbc9bb6ca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user