diff options
author | David S. Miller <davem@davemloft.net> | 2016-05-10 00:50:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-10 00:50:20 -0400 |
commit | adc0a8bfdc52cbbfe76730b166a17cb0d5cbc0f4 (patch) | |
tree | 2e36817cdefc4a23667475f6c2f3c48d0bea358e | |
parent | 161de2caf68c549c266e571ffba8e2163886fb10 (diff) | |
parent | eda3fc50daa93b08774a18d51883c5a5d8d85e15 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:
====================
Netfilter fixes for net
The following patchset contain Netfilter simple fixes for your net tree,
two one-liner and one two-liner:
1) Oneliner to fix missing spinlock definition that triggers
'BUG: spinlock bad magic on CPU#' when spinlock debugging is enabled,
from Florian Westphal.
2) Fix missing workqueue cancelation on IDLETIMER removal,
from Liping Zhang.
3) Fix insufficient validation of netlink of NFACCT_QUOTA in
nfnetlink_acct, from Phil Turnbull.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_acct.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_IDLETIMER.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index afde5f5e728a..895d11dced3c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -66,7 +66,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_locks); | |||
66 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock); | 66 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock); |
67 | EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock); | 67 | EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock); |
68 | 68 | ||
69 | static __read_mostly spinlock_t nf_conntrack_locks_all_lock; | 69 | static __read_mostly DEFINE_SPINLOCK(nf_conntrack_locks_all_lock); |
70 | static __read_mostly bool nf_conntrack_locks_all; | 70 | static __read_mostly bool nf_conntrack_locks_all; |
71 | 71 | ||
72 | void nf_conntrack_lock(spinlock_t *lock) __acquires(lock) | 72 | void nf_conntrack_lock(spinlock_t *lock) __acquires(lock) |
diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c index 4c2b4c0c4d5f..dbd0803b1827 100644 --- a/net/netfilter/nfnetlink_acct.c +++ b/net/netfilter/nfnetlink_acct.c | |||
@@ -96,6 +96,8 @@ static int nfnl_acct_new(struct net *net, struct sock *nfnl, | |||
96 | return -EINVAL; | 96 | return -EINVAL; |
97 | if (flags & NFACCT_F_OVERQUOTA) | 97 | if (flags & NFACCT_F_OVERQUOTA) |
98 | return -EINVAL; | 98 | return -EINVAL; |
99 | if ((flags & NFACCT_F_QUOTA) && !tb[NFACCT_QUOTA]) | ||
100 | return -EINVAL; | ||
99 | 101 | ||
100 | size += sizeof(u64); | 102 | size += sizeof(u64); |
101 | } | 103 | } |
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 29d2c31f406c..daf45da448fa 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c | |||
@@ -236,6 +236,7 @@ static void idletimer_tg_destroy(const struct xt_tgdtor_param *par) | |||
236 | 236 | ||
237 | list_del(&info->timer->entry); | 237 | list_del(&info->timer->entry); |
238 | del_timer_sync(&info->timer->timer); | 238 | del_timer_sync(&info->timer->timer); |
239 | cancel_work_sync(&info->timer->work); | ||
239 | sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr); | 240 | sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr); |
240 | kfree(info->timer->attr.attr.name); | 241 | kfree(info->timer->attr.attr.name); |
241 | kfree(info->timer); | 242 | kfree(info->timer); |