From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next V2] tuntap: fix possible deadlock when fail to register netdev Date: Thu, 07 Dec 2017 21:36:06 -0800 Message-ID: <1512711366.25033.21.camel@gmail.com> References: <1512705750-14799-1-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, mst@redhat.com, Willem de Bruijn To: Jason Wang , netdev@vger.kernel.org Return-path: In-Reply-To: <1512705750-14799-1-git-send-email-jasowang@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Fri, 2017-12-08 at 12:02 +0800, Jason Wang wrote: > Private destructor could be called when register_netdev() fail with > rtnl lock held. This will lead deadlock in tun_free_netdev() who > tries > to hold rtnl_lock. Fixing this by switching to use spinlock to > synchronize. > > Fixes: 96f84061620c ("tun: add eBPF based queue selection method") > Reported-by: Eric Dumazet > Cc: Eric Dumazet > Cc: Willem de Bruijn > Signed-off-by: Jason Wang > --- Reviewed-by: Eric Dumazet Thanks.