From: Padam Jeet Singh <padam.singh@inventum.net>
To: dev@dpdk.org
Subject: [dpdk-dev] Missing Null check in ip_frag_find?
Date: Tue, 9 May 2017 23:34:05 +0530 [thread overview]
Message-ID: <29C8F356-9A8F-4621-B6B0-DE66DDBA8F36@inventum.net> (raw)
Hi,
I have been trying to trace a segfault in ip_frag_find which I am seeing in production for some time now.
In the following code in function ip_frag_find from ip_frag_internal.c, the lru is not being validated for being not null. At this point the table is guaranteed to have an entry in the tail queue? Is a null check on lru required here?
/*
* we found a free entry, check if we can use it.
* If we run out of free entries in the table, then
* check if we have a timed out entry to delete.
*/
} else if (free != NULL &&
tbl->max_entries <= tbl->use_entries) {
lru = TAILQ_FIRST(&tbl->lru);
if (max_cycles + lru->start < tms) {
ip_frag_tbl_del(tbl, dr, lru);
} else {
free = NULL;
IP_FRAG_TBL_STAT_UPDATE(&tbl->stat,
fail_nospace, 1);
}
}
Thanks,
Padam
reply other threads:[~2017-05-09 18:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29C8F356-9A8F-4621-B6B0-DE66DDBA8F36@inventum.net \
--to=padam.singh@inventum.net \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).