On Fri, Oct 12, 2018 at 1:39 PM Davide Caratti wrote:
> Several TC actions allow users to specify a fallback control action, that
> is usually stored in the action private data. 'goto chain x' never worked
> for that case, because the action handler was never initialized. There is
> only one
Hi,
I tried to run tc-tests with some old iproute2 package, it is painful.
I'd suggest the following improvements:
1. Create veth pair devices by its own. The most important thing for
tc-tests is to automate everything, it is not friendly for users to
create their own veth pair named v0p0 to
getting a zero refcnt.
Fix it by setting SOCK_RCU_FREE in llc_sap_add_socket().
Reported-by: syzbot+11e05f04c15e03be5...@syzkaller.appspotmail.com
Signed-off-by: Cong Wang
---
net/llc/llc_conn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c
index
(Cc'ing Dave)
On Wed, Oct 10, 2018 at 5:14 AM Meelis Roos wrote:
>
> Thies 4.19-rc7 on a bunch of test machines and got this warning from one.
> It is reproducible and I have not noticed it before.
>
[...]
> [9.914805] WARNING: CPU: 0 PID: 0 at kernel/softirq.c:168
>
On Wed, Oct 10, 2018 at 8:54 AM Josh Coombs wrote:
>
> 2.3 billion 1 byte packets failed to re-create the bug. To try and
> simplify the setup I removed macsec from the equation, using a single
> host in the middle as the bridge. Interestingly, rather than 1.3Gbits
> a second in both
On Tue, Oct 9, 2018 at 2:26 PM Davide Caratti wrote:
> --- a/net/sched/sch_api.c
> +++ b/net/sched/sch_api.c
> @@ -1322,6 +1322,7 @@ const struct nla_policy rtm_tca_policy[TCA_MAX + 1] = {
> [TCA_INGRESS_BLOCK] = { .type = NLA_U32 },
> [TCA_EGRESS_BLOCK] = { .type =
;net_sched: change tcf_del_walker() to take idrinfo->lock")
Reported-by: Ido Schimmel
Cc: Jamal Hadi Salim
Cc: Vlad Buslov
Cc: Jiri Pirko
Signed-off-by: Cong Wang
---
include/net/act_api.h | 4 ++--
net/sched/act_api.c| 44 ++--
n
On Fri, Sep 28, 2018 at 9:47 PM Cong Wang wrote:
>
> Just FYI, the crash is fixed, but another RCU warning pops up after
> my fix. So I am still debugging it, it is related to the kfree_rcu() in
> tcf_chain_destroy().
Update: I tried very hard to make it working, the end result i
On Fri, Sep 28, 2018 at 11:29 AM Cong Wang wrote:
>
> On Fri, Sep 28, 2018 at 11:11 AM Ido Schimmel wrote:
> > I don't think this will work given the reference count already dropped
> > to 0, which is why the template deletion function was invoked. I didn't
> > test th
On Fri, Sep 28, 2018 at 12:02 PM Cong Wang wrote:
>
> On Fri, Sep 28, 2018 at 11:26 AM Dave Jones wrote:
> > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> > index 3219a2932463..4f9494381635 100644
> > --- a/net/core/netpoll.c
> > +++ b/net/core/netpoll.
On Fri, Sep 28, 2018 at 11:26 AM Dave Jones wrote:
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index 3219a2932463..4f9494381635 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -330,6 +330,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct
> sk_buff *skb,
On Fri, Sep 28, 2018 at 11:11 AM Ido Schimmel wrote:
> I don't think this will work given the reference count already dropped
> to 0, which is why the template deletion function was invoked. I didn't
> test the patch, but I don't see what would prevent the chain from being
> freed.
Good catch!
On Fri, Sep 28, 2018 at 7:59 AM Ido Schimmel wrote:
>
> On Wed, Sep 19, 2018 at 04:37:29PM -0700, Cong Wang wrote:
> > From: Vlad Buslov
> >
> > From: Vlad Buslov
> >
> > Action API was changed to work with actions and action_idr in concurrency
> > s
On Fri, Sep 28, 2018 at 10:25 AM Dave Jones wrote:
>
> On Fri, Sep 28, 2018 at 09:55:52AM -0700, Cong Wang wrote:
> > On Fri, Sep 28, 2018 at 9:18 AM Dave Jones wrote:
> > >
> > > Callers of bond_for_each_slave_rcu are expected to hold the rcu lock,
>
(Changing $subject as the discussion is going to a completely different topic)
On Thu, Sep 27, 2018 at 3:19 PM Eric Dumazet wrote:
>
>
>
> On 09/27/2018 02:36 PM, Cong Wang wrote:
>
> > I don't understand what you mean by changing ip command, you must
> > mean tc
On Thu, Sep 27, 2018 at 1:42 PM Cong Wang wrote:
>
> It is clearly a copy-n-paste.
>
> Signed-off-by: Cong Wang
I regret again for wasting my time, so:
NAcked-by: Cong Wang
I really don't care, do you?
On Fri, Sep 28, 2018 at 4:36 AM Vlad Buslov wrote:
>
> On Thu 27 Sep 2018 at 20:42, Cong Wang wrote:
> > It is clearly a copy-n-paste.
> >
> > Signed-off-by: Cong Wang
> > ---
> > net/sched/cls_api.c | 2 +-
> > 1 file changed, 1 insertion(+), 1
On Fri, Sep 28, 2018 at 9:18 AM Dave Jones wrote:
>
> Callers of bond_for_each_slave_rcu are expected to hold the rcu lock,
> otherwise a trace like below is shown
So why not take rcu read lock in netpoll_send_skb_on_dev() where
RCU is also assumed?
As I said, I can't explain why you didn't
On Thu, Sep 27, 2018 at 2:16 PM Eric Dumazet wrote:
>
>
>
> On 09/27/2018 01:42 PM, Cong Wang wrote:
> > It is clearly a copy-n-paste.
> >
> > Signed-off-by: Cong Wang
> > ---
> > net/sched/cls_api.c | 2 +-
> > 1 file changed, 1 insertion(
: use Qdisc rcu API instead of relying on rtnl
lock")
Signed-off-by: Cong Wang
---
net/sched/cls_api.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 8dd7f8af6d54..a4167ec0a220 100644
--- a/net/sched/cls_api.c
+++ b
It is clearly a copy-n-paste.
Signed-off-by: Cong Wang
---
net/sched/cls_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 3de47e99b788..8dd7f8af6d54 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -655,7
On Thu, Sep 27, 2018 at 1:11 AM Dmitry Vyukov wrote:
>
> Would a stack trace for call_rcu be helpful here? I have this idea for
> a long time, but never get around to implementing it:
> https://bugzilla.kernel.org/show_bug.cgi?id=198437
Yes. Generally speaking, showing backtrace of call_rcu()
or
On Mon, Sep 24, 2018 at 1:08 PM Dave Jones wrote:
>
> Callers of bond_for_each_slave_rcu are expected to hold the rcu lock,
> otherwise a trace like below is shown
Interesting, netpoll_send_skb_on_dev() already assumes RCU read lock
when it calls rcu_dereference_bh()...
I wonder how it can't
e refcount.h in rtnetlink.h.
> - Patch 3:
> - Move rcu_head field to the end of struct Qdisc.
> - Rearrange local variable declarations in qdisc_lookup_rcu().
> - Patch 5:
> - Remove tcf_qdisc_put() and inline its content to callers.
Overall looks good to me,
Acked-by: Cong Wang
There are some minor issues like qdisc_free_cb() can be static,
please send follow-up patch to address it.
Thanks.
On Thu, Sep 20, 2018 at 12:36 AM Vlad Buslov wrote:
>
>
> On Wed 19 Sep 2018 at 22:09, Cong Wang wrote:
> > On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
> >> @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *bloc
On Thu, Sep 20, 2018 at 12:21 AM Vlad Buslov wrote:
>
>
> On Wed 19 Sep 2018 at 22:04, Cong Wang wrote:
> > On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
> >> +static void tcf_qdisc_put(struct Qdisc *q, bool rtnl_held)
> >> +{
> >> +
On Thu, Sep 20, 2018 at 1:58 AM Li RongQing wrote:
>
> if skb->head is vmalloc address, when this skb is delivered, full
> allocation for this skb is required, if there are many devices,
> the full allocation will be called for every devices
So why do you in practice need many netlink tap
On Wed, Sep 19, 2018 at 6:04 AM Paolo Abeni wrote:
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index 419960b0ba16..a0b6932c3afd 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -1234,7 +1234,7 @@ static inline int
> ip4ip6_tnl_xmit(struct sk_buff *skb,
On Thu, Sep 20, 2018 at 2:04 AM Kirill Tkhai wrote:
>
> On 20.09.2018 0:28, Cong Wang wrote:
> You added me to CC, so you probably want to know my opinion about this.
> Since it's not a real problem fix, but just a refactoring, I say you
> my opinion, how this refactoring may
isks on error path
ordering, it is never late to bring this up again when any
future change needs it, until that:
Nacked-by: Cong Wang
On Thu, Sep 20, 2018 at 2:12 AM Kirill Tkhai wrote:
>
> From: Cong Wang
>
> ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4,
> but its initialization is in the generic netns code, setup_net().
>
> Move it to IPv4 specific net init code, inet_init_net().
&g
Buslov
[xiyou.wangc...@gmail.com: heavily modify the code and changelog]
Signed-off-by: Cong Wang
---
net/sched/act_api.c| 20 +++-
net/sched/cls_flower.c | 13 +++--
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
> @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *block,
> struct net *net,
> struct netlink_ext_ack *extack)
> {
> struct tcf_net *tn = net_generic(net, tcf_net_id);
> + int err;
>
On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
> +static void tcf_qdisc_put(struct Qdisc *q, bool rtnl_held)
> +{
> + if (!q)
> + return;
> +
> + if (rtnl_held)
> + qdisc_put(q);
> + else
> + qdisc_put_unlocked(q);
> +}
This is
On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -130,6 +130,12 @@ int rtnl_is_locked(void)
> }
> EXPORT_SYMBOL(rtnl_is_locked);
>
> +bool refcount_dec_and_rtnl_lock(refcount_t *r)
> +{
> + return
On Wed, Sep 19, 2018 at 1:25 AM Kirill Tkhai wrote:
>
> On 18.09.2018 23:17, Cong Wang wrote:
> > On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote:
> >> In inet_init() the order of registration is:
> >>
> >> ip_mr_init();
> >>
On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote:
> In inet_init() the order of registration is:
>
> ip_mr_init();
> init_inet_pernet_ops();
>
> This means, ipmr_net_ops pernet operations are before af_inet_ops
> in pernet_list. So, there is a theoretical probability, sometimes
On Fri, Sep 14, 2018 at 2:53 AM Jiri Pirko wrote:
>
> Thu, Sep 13, 2018 at 10:52:01PM CEST, amritha.namb...@intel.com wrote:
> >This patch introduces a TC range classifier to support filtering based
> >on ranges. Only port-range filters are supported currently. This can
> >be combined with flower
On Thu, Sep 13, 2018 at 6:53 PM Amritha Nambiar
wrote:
>
> This patch introduces a range classifier to support filtering based
> on ranges. Only port-range filters are supported currently. This can
> be combined with flower classifier to support filters that are a
> combination of port-ranges and
On Fri, Sep 14, 2018 at 3:46 AM Vlad Buslov wrote:
>
>
> On Thu 13 Sep 2018 at 17:13, Cong Wang wrote:
> > On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote:
> >>
> >>
> >> On Fri 07 Sep 2018 at 19:12, Cong Wang wrote:
> >>
ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4,
but its initialization is in the generic netns code, setup_net().
Move it to IPv4 specific net init code, inet_init_net().
Fixes: d9ff3049739e ("net: Replace ip_ra_lock with per-net mutex")
Cc: Kirill Tkhai
Signed-of
On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote:
>
>
> On Fri 07 Sep 2018 at 20:09, Cong Wang wrote:
> > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
> >>
> >> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually
> >> attach/d
On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote:
>
>
> On Fri 07 Sep 2018 at 19:12, Cong Wang wrote:
> > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote:
> >>
> >> Action API was changed to work with actions and action_idr in concurrency
> >> safe m
When we delete a chain of filters, we need to notify
user-space we are deleting each filters in this chain
too.
Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
Cc: Jiri Pirko
Signed-off-by: Cong Wang
---
net/sched/cls_api.c | 2 ++
1 file changed, 2 insertions(+)
llc_sap_close() is called by llc_sap_put() which
could be called in BH context in llc_rcv(). We can't
block in BH.
There is no reason to block it here, kfree_rcu() should
be sufficient.
Signed-off-by: Cong Wang
---
include/net/llc.h | 1 +
net/llc/llc_core.c | 4 +---
2 files changed, 2
protection in rds_find_bound()
to close this race condition.
Reported-and-tested-by: syzbot+8967084bcac563795...@syzkaller.appspotmail.com
Reported-by: syzbot+93a5839deb3555374...@syzkaller.appspotmail.com
Cc: Sowmini Varadhan
Cc: Santosh Shilimkar
Cc: rds-de...@oss.oracle.com
Signed-off-by: Cong Wang
On Mon, Sep 10, 2018 at 5:56 PM Santosh Shilimkar
wrote:
>
> On 9/10/2018 5:45 PM, Cong Wang wrote:
> > On Mon, Sep 10, 2018 at 5:26 PM Santosh Shilimkar
> > wrote:
> >> Would you mind posting an updated patch please with call_rcu and
> >> above extended
On Mon, Sep 10, 2018 at 5:26 PM Santosh Shilimkar
wrote:
> Would you mind posting an updated patch please with call_rcu and
> above extended RCU grace period with rcu_read_lock. Thanks !!
If you prefer to fix _two_ problems in one patch, sure.
For the record, the bug this patch fixes is NOT
On Mon, Sep 10, 2018 at 5:24 PM Sowmini Varadhan
wrote:
>
> On (09/10/18 17:16), Cong Wang wrote:
> > >
> > > On (09/10/18 16:51), Cong Wang wrote:
> > > >
> > > > __rds_create_bind_key(key, addr, port, scope_id);
> > > > -
On Mon, Sep 10, 2018 at 5:04 PM Sowmini Varadhan
wrote:
>
> On (09/10/18 16:51), Cong Wang wrote:
> >
> > __rds_create_bind_key(key, addr, port, scope_id);
> > - rs = rhashtable_lookup_fast(_hash_table, key, ht_parms);
> > + rcu_read_lock();
>
On Mon, Sep 10, 2018 at 4:30 PM Sowmini Varadhan
wrote:
>
> On (09/10/18 15:43), Santosh Shilimkar wrote:
> > On 9/10/2018 3:24 PM, Cong Wang wrote:
> > >When a rds sock is bound, it is inserted into the bind_hash_table
> > >which is protected by RCU. But
sock as SOCK_RCU_FREE before inserting it into the
bind_hash_table, so that it would be always freed after a RCU grace
period.
Reported-and-tested-by: syzbot+8967084bcac563795...@syzkaller.appspotmail.com
Cc: Sowmini Varadhan
Cc: Santosh Shilimkar
Cc: rds-de...@oss.oracle.com
Signed-off-by: Cong
We no longer take any spinlock on RX path for ingress qdisc,
so this lockdep annotation is no longer needed.
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
---
net/sched/sch_api.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index
cl->leaf.q is slightly more readable than cl->un.leaf.q.
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
---
net/sched/sch_htb.c | 98 ++---
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch
On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>
> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually
> attach/detach block to specific Qdisc besides just taking/putting
> reference. Rename them according to their purpose.
Where exactly does it attach to?
Each qdisc provides
On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>
> Extend tcf_block with rcu to allow safe deallocation when it is accessed
> concurrently.
This sucks, please fold this patch into where you call rcu_read_lock()
on tcf block.
This patch _alone_ is apparently not complete. This is not how
we
On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>
> Extend Qdisc_class_ops with flags. Create enum to hold possible class ops
> flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED
> to indicate that class ops functions can be called without taking rtnl
> lock.
We don't
On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote:
>
> Action API was changed to work with actions and action_idr in concurrency
> safe manner, however tcf_del_walker() still uses actions without taking a
> reference or idrinfo->lock first, and deletes them directly, disregarding
> possible
On Wed, Sep 5, 2018 at 12:04 PM Al Viro wrote:
>
> From: Al Viro
>
> unused
>
> Signed-off-by: Al Viro
> ---
> net/sched/cls_u32.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
> index 8a1a573487bd..be9240ae1417 100644
> ---
On Thu, Sep 6, 2018 at 8:50 PM Al Viro wrote:
>
> On Thu, Sep 06, 2018 at 08:23:36PM -0700, Cong Wang wrote:
>
> > Pretty sure there is a 'tp' in u32_set_parms() parameter list.
> >
> > Are you saying it is not what you want? If so, why?
> >
> > More imp
On Thu, Sep 6, 2018 at 8:04 PM Al Viro wrote:
>
> On Thu, Sep 06, 2018 at 07:57:25PM -0700, Cong Wang wrote:
>
> > > - if (root_ht == ht) {
> > > + if (ht->is_root) {
> >
> >
> > What's wrong with comparing pointers with root ht?
>
&
On Thu, Sep 6, 2018 at 3:59 AM Al Viro wrote:
>
> diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
> index 3f985f29ef30..d14048e38b5c 100644
> --- a/net/sched/cls_u32.c
> +++ b/net/sched/cls_u32.c
> @@ -84,6 +84,7 @@ struct tc_u_hnode {
> int refcnt;
>
Signed-off-by: Cong Wang
---
net/sched/act_tunnel_key.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
index 28d58bbc953e..681f6f04e7da 100644
--- a/net/sched/act_tunnel_key.c
+++ b/net/sched/act_tunnel_key.c
@@ -412
On Thu, Sep 6, 2018 at 4:14 AM Vlad Buslov wrote:
> > Isn't a concurrent tcf_idr_check_alloc() able to livelock here with
> > your change?
> >
> > idr_for_each_entry_ul{
> >spin_lock(>lock);
> >idr_remove();
> >spin_unlock(>lock);
> > // tcf_idr_check_alloc() jumps in,
> >
On Wed, Sep 5, 2018 at 12:05 AM Vlad Buslov wrote:
>
>
> On Tue 04 Sep 2018 at 22:41, Cong Wang wrote:
> > On Mon, Sep 3, 2018 at 1:33 PM Vlad Buslov wrote:
> >>
> >>
> >> On Mon 03 Sep 2018 at 18:50, Cong Wang wrote:
> >> &
On Wed, Sep 5, 2018 at 4:06 AM Sami Farin wrote:
>
> 4.17 worked ok, this with 32 GB Ryzen system.
>
> BUG: unable to handle kernel NULL pointer dereference at 0050
> PGD 0 P4D 0
> Oops: [#1] PREEMPT SMP NOPTI
> CPU: 0 PID: 6303 Comm: grep Tainted: GT 4.18.6+ #16
On Mon, Sep 3, 2018 at 1:33 PM Vlad Buslov wrote:
>
>
> On Mon 03 Sep 2018 at 18:50, Cong Wang wrote:
> > On Mon, Sep 3, 2018 at 12:06 AM Vlad Buslov wrote:
> >>
> >> Action API was changed to work with actions and action_idr in concurrency
> >> safe m
gt;
> Implement add_metainfo_and_get_ops() function that returns with reference
> to module taken if metainfo was added successfully, and call it from
> use_all_metadata(), instead of calling __add_metainfo() directly.
Acked-by: Cong Wang
This one should go to -net too.
On Tue, Sep 4, 2018 at 10:00 AM Davide Caratti wrote:
>
> If users try to install act_tunnel_key 'set' rules with duplicate values
> of 'index', the tunnel metadata are allocated, but never released. Then,
> kmemleak complains as follows:
Acked-by: Cong Wang
On Mon, Sep 3, 2018 at 12:49 PM Cong Wang wrote:
>
> __tipc_nl_compat_dumpit() uses a netlink_callback on stack,
> so the only way to align it with other ->dumpit() call path
> is calling tipc_dump_start() and tipc_dump_done() directly
> inside it. Otherwise ->dumpit() would
t;tipc: switch to rhashtable iterator")
Reported-by: syzbot+e93a2c41f91b8e2c7...@syzkaller.appspotmail.com
Cc: Jon Maloy
Cc: Ying Xue
Signed-off-by: Cong Wang
---
net/tipc/netlink_compat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
On Mon, Sep 3, 2018 at 12:06 AM Vlad Buslov wrote:
>
> Action API was changed to work with actions and action_idr in concurrency
> safe manner, however tcf_del_walker() still uses actions without taking
> reference to them first and deletes them directly, disregarding possible
> concurrent
; time in error handling code of tca_action_gd().
Oops, good catch.
Acked-by: Cong Wang
David, this one should also go to -net rather than -net-next.
Immediately after module_put(), user could delete this
module, so e->ops could be already freed before we call
e->ops->release().
Fix this by moving module_put() after ops->release().
Fixes: ef6980b6becb ("introduce IFE action")
Cc: Jamal Hadi Salim
Signed-off-by: Con
eadlock")
> Signed-off-by: Vlad Buslov
This patch should be applied to -net rather than -net-next.
Acked-by: Cong Wang
One nit below.
> static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
> int len, bool exists)
> {
> @@ -349,7 +364
On Mon, Sep 3, 2018 at 10:12 AM Vlad Buslov wrote:
>
>
> On Mon 03 Sep 2018 at 17:03, Cong Wang wrote:
> > On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov wrote:
> >>
> >> Recent refactoring of add_metainfo() caused use_all_metadata() to add
> >> meta
On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov wrote:
>
> Recent refactoring of add_metainfo() caused use_all_metadata() to add
> metainfo to ife action metalist without taking reference to module. This
> causes warning in module_put called from ife action cleanup function.
>
> Implement
This reverts commit 331a9295de23 ("net: sched: act: add extack for lookup
callback").
This extack is never used after 6 months... In fact, it can be just
set in the caller, right after ->lookup().
Cc: Alexander Aring
Signed-off-by: Cong Wang
---
include/net/act_api.h | 3 +
According to the new locking rule, we have to take tcf_lock
for both ->init() and ->dump(), as RTNL will be removed.
However, it is missing for act_connmark.
Cc: Vlad Buslov
Signed-off-by: Cong Wang
---
net/sched/act_connmark.c | 11 ---
1 file changed, 8 insertions(+), 3 del
UNIX_DIAG_VFS and UNIX_DIAG_ICONS are never used by ss,
make them available in ss -e output.
Cc: Stephen Hemminger
Signed-off-by: Cong Wang
---
misc/ss.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/misc/ss.c b/misc/ss.c
index 41e7762b..b2c634c8 100644
--- a/misc
On Mon, Aug 27, 2018 at 3:27 PM Stephen Hemminger
wrote:
>
> On Mon, 27 Aug 2018 14:46:52 -0700
> Cong Wang wrote:
>
> > UNIX_DIAG_VFS and UNIX_DIAG_ICONS are never used by ss,
> > make them available in ss -e output.
> >
> > Cc: Stephen Hemminger
> > S
On Tue, Aug 28, 2018 at 7:25 AM Paolo Abeni wrote:
>
> +int tcf_action_destroy_one(struct tc_action *a, int bind)
> +{
> + struct tc_action *actions[] = { a, NULL };
> +
> + return tcf_action_destroy(actions, bind);
> +}
Make it static.
> +
> static int tcf_action_put(struct
illrect sysimgblt
> fb_sys_fops ttm drm ata_piix virtio_pci libata virtio_ring i2c_core virtio
> floppy dm_mirror dm_region_hash dm_log dm_mod [last unloaded: act_pedit]
> CR2:
>
> Like it's done for other TC actions, give up dumping pedit rules and return
> an error if nla_nest_start() returns NULL.
Looks good to me,
Acked-by: Cong Wang
While you are at it, please fix act_tunnel_key too.
Thanks.
UNIX_DIAG_VFS and UNIX_DIAG_ICONS are never used by ss,
make them available in ss -e output.
Cc: Stephen Hemminger
Signed-off-by: Cong Wang
---
misc/ss.c | 25 +
1 file changed, 25 insertions(+)
diff --git a/misc/ss.c b/misc/ss.c
index 41e7762b..d28bc1ec 100644
On Mon, Aug 27, 2018 at 11:58 AM Jiri Pirko wrote:
>
> From: Jiri Pirko
>
> Jiri Pirko (2):
> net: sched: fix extack error message when chain is failed to be
> created
> net: sched: return -ENOENT when trying to remove filter from
> non-existent chain
Acked-by: Cong Wang
On Sat, Aug 25, 2018 at 6:06 AM Jiri Pirko wrote:
>
> Fri, Aug 24, 2018 at 08:11:07PM CEST, xiyou.wangc...@gmail.com wrote:
> >On Fri, Aug 24, 2018 at 9:21 AM Roman Mashak wrote:
> >>
> >> So _before_ commit f71e0ca4db187af7c44987e9d21e9042c3046070 step 6 would
> >> return -ENOENT with "Error:
On Fri, Aug 24, 2018 at 9:21 AM Roman Mashak wrote:
>
> So _before_ commit f71e0ca4db187af7c44987e9d21e9042c3046070 step 6 would
> return -ENOENT with "Error: Filter with specified priority/protocol not
> found." and _after_ the commit it returns -EINVAL (Error: Cannot find
> specified filter
rhashtable_walk_exit() must be paired with rhashtable_walk_enter().
Fixes: 40f9f4397060 ("tipc: Fix tipc_sk_reinit race conditions")
Cc: Herbert Xu
Cc: Ying Xue
Signed-off-by: Cong Wang
---
net/tipc/socket.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tipc/socket.c
All the 3 callers of addrconf_add_mroute() assert RTNL
lock, they don't take any additional lock either, so
it is safe to convert it to GFP_KERNEL.
Same for sit_add_v4_addrs().
Cc: David Ahern
Signed-off-by: Cong Wang
---
net/ipv6/addrconf.c | 6 +++---
1 file changed, 3 insertions(+), 3
When CONFIG_NET_CLS_ACT=n, tcf_exts_for_each_action()
is a nop, which leaves its parameters unused. Shut up
the compiler warning by casting them to void.
Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
Reported-by: Stephen Rothwell
Signed-off-by: Cong Wang
---
i
On Mon, Aug 20, 2018 at 11:29 AM David Miller wrote:
>
> From: Cong Wang
> Date: Sun, 19 Aug 2018 12:22:12 -0700
>
> > The only time we need to take tcfa_lock is when adding
> > a new metainfo to an existing ife->metalist. We don't need
> > to take
oved.
Fixes: b409074e6693 ("net: sched: add 'delete' function to action ops")
Cc: Jiri Pirko
Cc: Vlad Buslov
Signed-off-by: Cong Wang
---
include/net/act_api.h | 2 --
net/sched/act_api.c| 15 +++
net/sched/act_bpf.c| 8
net/sched/act_connmark.
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
---
include/net/act_api.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/net/act_api.h b/include/net/act_api.h
index f9c4b871af88..970303448c90 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -28,7 +28,6 @@ struct
This reverts commit 42c625a486f3 ("net: sched: act_ife: disable bh
when taking ife_mod_lock"), because what ife_mod_lock protects
is absolutely not touched in rate est timer BH context, they have
no race.
A better fix is following up.
Cc: Vlad Buslov
Cc: Jamal Hadi Salim
Signed-of
tcf_idr_check() is replaced by tcf_idr_check_alloc(),
and __tcf_idr_check() now can be folded into tcf_idr_search().
Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action")
Cc: Jiri Pirko
Cc: Vlad Buslov
Signed-off-by: Cong Wang
---
include/net/act_api.h | 2 --
lad.
Reported-by: Vlad Buslov
Tested-by: Vlad Buslov
Cc: Vlad Buslov
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
---
net/sched/act_ife.c | 38 +-
1 file changed, 13 insertions(+), 25 deletions(-)
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
in
Fixes: 16af6067392c ("net: sched: implement reference counted action release")
Cc: Jiri Pirko
Cc: Vlad Buslov
Signed-off-by: Cong Wang
---
net/sched/act_api.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 00
efore reading ifeoplist")
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
---
net/sched/act_ife.c | 34 +-
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
index 244a8cf48183..196430aefe87 100644
--- a/net/sched
Cc: Vlad Buslov
Signed-off-by: Cong Wang
---
net/sched/act_api.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 229d63c99be2..cd69a6afcf88 100644
--- a/net/sched/act_api.c
+++ b/net/sched
for it.
Patch 9 fixes a potential deadlock found by me during code review.
Please see each patch for details.
Cc: Jamal Hadi Salim
Signed-off-by: Cong Wang
Cong Wang (9):
net_sched: improve and refactor tcf_action_put_many()
net_sched: remove unnecessary ops->delete()
net_sched: remove unu
101 - 200 of 1974 matches
Mail list logo