[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpV=2dKPqGmCUD5W3Ekd600E0+h39e_y2PTgwKW1xG-+WQ@mail.gmail.com>
Date: Fri, 3 Nov 2017 18:15:27 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc: Lucas Bates <lucasb@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [Patch net 2/2] net_sched: hold netns refcnt for each action
On Wed, Nov 1, 2017 at 10:23 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> TC actions have been destroyed asynchronously for a long time,
> previously in a RCU callback and now in a workqueue. If we
> don't hold a refcnt for its netns, we could use the per netns
> data structure, struct tcf_idrinfo, after it has been freed by
> netns workqueue.
>
> Hold refcnt to ensure netns destroy happens after all actions
> are gone.
This in fact is wrong. If we hold that refcnt, the netns can never
be destroyed until all actions are destroyed by user, this breaks
our netns design.
I am going to send a revert and a right way to fix it. It is more
complicated that I thought due to all of these flying RCU callbacks
and workqueue again, sigh...
Sorry about it.
Powered by blists - more mailing lists