From: Jason Wang <jasowang@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: mst@redhat.com, willemdebruijn.kernel@gmail.com,
tom@herbertland.com, aconole@redhat.com, wexu@redhat.com
Subject: Re: [PATCH net-next V3] tun: add eBPF based queue selection method
Date: Fri, 8 Dec 2017 10:25:19 +0800 [thread overview]
Message-ID: <bf7d3043-d795-ac00-7183-59b081b19142@redhat.com> (raw)
In-Reply-To: <1512684709.25033.18.camel@gmail.com>
On 2017年12月08日 06:11, Eric Dumazet wrote:
> On Mon, 2017-12-04 at 17:31 +0800, Jason Wang wrote:
>> This patch introduces an eBPF based queue selection method. With
>> this,
>> the policy could be offloaded to userspace completely through a new
>> ioctl TUNSETSTEERINGEBPF.
> Sorry for the delay, I see this patch was merged already.
>
> ...
>
>> static void tun_free_netdev(struct net_device *dev)
>> {
>> struct tun_struct *tun = netdev_priv(dev);
>> @@ -1996,6 +2068,9 @@ static void tun_free_netdev(struct net_device
>> *dev)
>> free_percpu(tun->pcpu_stats);
>> tun_flow_uninit(tun);
>> security_tun_dev_free_security(tun->security);
>> + rtnl_lock();
>> + __tun_set_steering_ebpf(tun, NULL);
>> + rtnl_unlock();
>> }
> I am pretty sure tun_free_netdev() (aka ->priv_destructor()) can be
> called under RTNL (say from register_netdevice())
>
> So this will dead lock badly ?
>
>
Unfortunately yes. Will switch to use spinlock (tun->lock) to
synchronize here.
Thanks
prev parent reply other threads:[~2017-12-08 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 9:31 Jason Wang
2017-12-05 0:16 ` Willem de Bruijn
2017-12-05 7:29 ` Jason Wang
2017-12-05 16:13 ` Willem de Bruijn
2017-12-05 17:02 ` David Miller
2017-12-06 2:30 ` Jason Wang
2017-12-07 22:11 ` Eric Dumazet
2017-12-08 2:25 ` Jason Wang [this message]
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=bf7d3043-d795-ac00-7183-59b081b19142@redhat.com \
--to=jasowang@redhat.com \
--cc=aconole@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
--cc=wexu@redhat.com \
--cc=willemdebruijn.kernel@gmail.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
all inboxes | Powered by JetHome®