From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbdLHFgM (ORCPT ); Fri, 8 Dec 2017 00:36:12 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:33802 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbdLHFgK (ORCPT ); Fri, 8 Dec 2017 00:36:10 -0500 X-Google-Smtp-Source: AGs4zMbCpdVw/mEP3B/rBZ0BcCISiixNYlWLBUzp4h8F8a7e4f7RU3I/nyOin0x8aSUtq2vH4aC5sA== Message-ID: <1512711366.25033.21.camel@gmail.com> Subject: Re: [PATCH net-next V2] tuntap: fix possible deadlock when fail to register netdev From: Eric Dumazet To: Jason Wang , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, mst@redhat.com, Willem de Bruijn Date: Thu, 07 Dec 2017 21:36:06 -0800 In-Reply-To: <1512705750-14799-1-git-send-email-jasowang@redhat.com> References: <1512705750-14799-1-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.