ip_reass: use correct comparison in ipreass_callout()

Reported-by:	syzbot+55415dc73f9b89b87fce@syzkaller.appspotmail.com
This commit is contained in:
Gleb Smirnoff 2022-09-14 08:32:07 -07:00
parent e2386f18ec
commit 15b73a2a14

View File

@ -599,11 +599,11 @@ ipreass_callout(void *arg)
CURVNET_SET(bucket->vnet);
fp = TAILQ_LAST(&bucket->head, ipqhead);
KASSERT(fp != NULL && fp->ipq_expire >= time_uptime,
KASSERT(fp != NULL && fp->ipq_expire <= time_uptime,
("%s: stray callout on bucket %p, %ju < %ju", __func__, bucket,
fp ? (uintmax_t)fp->ipq_expire : 0, (uintmax_t)time_uptime));
while (fp != NULL && fp->ipq_expire >= time_uptime) {
while (fp != NULL && fp->ipq_expire <= time_uptime) {
ipq_timeout(bucket, fp);
fp = TAILQ_LAST(&bucket->head, ipqhead);
}