From: Roi Dayan <roid@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: Roi Dayan <roid@nvidia.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
"Oz Shlomo" <ozsh@nvidia.com>, Paul Blakey <paulb@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it
Date: Sun, 11 Apr 2021 11:13:34 +0300 [thread overview]
Message-ID: <20210411081334.1994938-1-roid@nvidia.com> (raw)
It could be dst_cache was not set so check it's not null before using
it.
Fixes: 8b9229d15877 ("netfilter: flowtable: dst_check() from garbage collector path")
Signed-off-by: Roi Dayan <roid@nvidia.com>
---
net/netfilter/nf_flow_table_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c
index 76573bae6664..e426077aaed1 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -410,6 +410,8 @@ static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
if (tuple->xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
tuple->xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
dst = tuple->dst_cache;
+ if (!dst)
+ return false;
if (!dst_check(dst, tuple->dst_cookie))
return true;
}
--
2.26.2
next reply other threads:[~2021-04-11 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 8:13 Roi Dayan [this message]
2021-04-11 10:58 ` [PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it Pablo Neira Ayuso
2021-04-12 8:26 ` Roi Dayan
2021-04-12 11:42 ` Pablo Neira Ayuso
2021-04-13 7:58 ` Roi Dayan
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=20210411081334.1994938-1-roid@nvidia.com \
--to=roid@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=ozsh@nvidia.com \
--cc=pablo@netfilter.org \
--cc=paulb@nvidia.com \
--cc=saeedm@nvidia.com \
/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).