From patchwork Wed Sep 23 20:46:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 521859 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D9AE9140180 for ; Thu, 24 Sep 2015 06:46:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=XFa7HNl3; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755414AbbIWUqE (ORCPT ); Wed, 23 Sep 2015 16:46:04 -0400 Received: from mail-vk0-f53.google.com ([209.85.213.53]:33268 "EHLO mail-vk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755386AbbIWUqB (ORCPT ); Wed, 23 Sep 2015 16:46:01 -0400 Received: by vkgd64 with SMTP id d64so35816921vkg.0; Wed, 23 Sep 2015 13:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=pH3N/V39wRBYCke3F9xG9cGHVbuc/wgB+MQbGJXwjJg=; b=XFa7HNl3ua+Pv1Nc7yX2ukPaedWN5WuoeKBw52P0fF45mANzIRdSdaCIE0klZTDGIR Yu3rlvFQ/zS4H0IYpViYCGRwFxJkL+cP5yUJ81v89XOPdDXOlDY0HHYtubCLGr4tLyic iyvmSMRedWVNjG1bTbcdtBBJ7Pk9ArIXQZm7hPzmr0askVg3x0yRvnTS48QB83QEQjm9 rpChXfRZwHEabYyNZwQR6xvE8AhkpXgrmQnVQIsZJ55sjJVPHh7UGOTOez/3hBQxVm9O TK/YqLu7/j08hgQQkWUVGrcyWf1bwKtCGjovf5ZFf65jbebIEc2PM9MZ0gFfO7tpS3iA OUKA== MIME-Version: 1.0 X-Received: by 10.31.167.21 with SMTP id q21mr20561873vke.49.1443041160619; Wed, 23 Sep 2015 13:46:00 -0700 (PDT) Received: by 10.103.3.66 with HTTP; Wed, 23 Sep 2015 13:46:00 -0700 (PDT) Reply-To: sedat.dilek@gmail.com In-Reply-To: <20150923103803.GC2869@alphalink.fr> References: <20150923103803.GC2869@alphalink.fr> Date: Wed, 23 Sep 2015 22:46:00 +0200 Message-ID: Subject: Re: [Linux 4.2-rc8+...v4.3-rc2] REGRESSION: ppp: circular locking dependency detected: [pppd] ppp_dev_uninit() | rtnl_lock() From: Sedat Dilek To: Guillaume Nault Cc: "David S. Miller" , "netdev@vger.kernel.org" , LKML Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Sep 23, 2015 at 12:38 PM, Guillaume Nault wrote: > On Wed, Sep 23, 2015 at 08:06:16AM +0200, Sedat Dilek wrote: >> Without reverting the below culprit ppp patch... >> >> commit/?id=8cb775bc0a34dc596837e7da03fd22c747be618b >> ("ppp: fix device unregistration upon netns deletion") >> >> ...I have an unstable Internet connection via Network-Manager/ModemManager. >> >> First I saw this with Linux v4.2. >> > > Thanks for reporting the issue. Can you test this patch ? > > --- > diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c > index 0481daf..ed00446 100644 > --- a/drivers/net/ppp/ppp_generic.c > +++ b/drivers/net/ppp/ppp_generic.c > @@ -2755,6 +2755,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, > */ > dev_net_set(dev, net); > > + rtnl_lock(); > mutex_lock(&pn->all_ppp_mutex); > > if (unit < 0) { > @@ -2785,7 +2786,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, > ppp->file.index = unit; > sprintf(dev->name, "ppp%d", unit); > > - ret = register_netdev(dev); > + ret = register_netdevice(dev); > if (ret != 0) { > unit_put(&pn->units_idr, unit); > netdev_err(ppp->dev, "PPP: couldn't register device %s (%d)\n", > @@ -2797,6 +2798,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, > > atomic_inc(&ppp_unit_count); > mutex_unlock(&pn->all_ppp_mutex); > + rtnl_unlock(); > > *retp = 0; > return ppp; I have adapted your patch against Linux v4.2.1 and it fixes the issue for me. Testcase: 1. Stop network-manager and unload "PPP Deflate Compression module". 2. Reload module and restart NM. ( No call-traces pointing to ppp. ) Do you mind to send a proper patch with subject-line and commit-message? Can you embed the Fixes-tag and give credits like Reported-by/Tested-by? Thanks. - Sedat - From d4ace3e00129687b680977ecc5ea4c9a03e35b63 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Wed, 23 Sep 2015 22:33:31 +0200 Subject: [PATCH] ppp: Fix circular locking dependency --- drivers/net/ppp/ppp_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index fa8f5046afe9..487be20b6b12 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -2742,6 +2742,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, */ dev_net_set(dev, net); + rtnl_lock(); mutex_lock(&pn->all_ppp_mutex); if (unit < 0) { @@ -2772,7 +2773,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, ppp->file.index = unit; sprintf(dev->name, "ppp%d", unit); - ret = register_netdev(dev); + ret = register_netdevice(dev); if (ret != 0) { unit_put(&pn->units_idr, unit); netdev_err(ppp->dev, "PPP: couldn't register device %s (%d)\n", @@ -2784,6 +2785,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, atomic_inc(&ppp_unit_count); mutex_unlock(&pn->all_ppp_mutex); + rtnl_unlock(); *retp = 0; return ppp; -- 2.5.3