All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jason Wang <jasowang@redhat.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: Thu, 07 Dec 2017 14:11:49 -0800	[thread overview]
Message-ID: <1512684709.25033.18.camel@gmail.com> (raw)
In-Reply-To: <1512379883-11887-1-git-send-email-jasowang@redhat.com>

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 ?

  parent reply	other threads:[~2017-12-07 22:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04  9:31 [PATCH net-next V3] tun: add eBPF based queue selection method 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 [this message]
2017-12-08  2:25   ` Jason Wang

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=1512684709.25033.18.camel@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=aconole@redhat.com \
    --cc=jasowang@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.