projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3716e7
)
netfilter: nf_tables: don't update chain with unset counters
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Tue, 5 Aug 2014 15:25:59 +0000
(17:25 +0200)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 8 Aug 2014 13:38:50 +0000
(15:38 +0200)
Fix possible replacement of the per-cpu chain counters by null
pointer when updating an existing chain in the commit path.
Reported-by: Matteo Croce <technoboy85@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index c6f9d3d18ed1f9263ab821c294fcf13d2e19eb2c..9aa31f11056dc42d75461755377f7fc5f69a06c5 100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-899,6
+899,9
@@
static struct nft_stats __percpu *nft_stats_alloc(const struct nlattr *attr)
static void nft_chain_stats_replace(struct nft_base_chain *chain,
struct nft_stats __percpu *newstats)
{
+ if (newstats == NULL)
+ return;
+
if (chain->stats) {
struct nft_stats __percpu *oldstats =
nft_dereference(chain->stats);