Received: by 10.213.65.68 with SMTP id h4csp730680imn; Fri, 23 Mar 2018 14:47:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELs7h1FVFvB4+kqe1b4/pVuFHNbY1Mg8tsF8f4UDvmF5y7WxF7bw3vuSw2uSZhZm16UD/WUE X-Received: by 10.98.165.4 with SMTP id v4mr25441219pfm.51.1521841660024; Fri, 23 Mar 2018 14:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521841659; cv=none; d=google.com; s=arc-20160816; b=AjNGW+0pmoUmvtta8ZqWI06+njlMOINr3bmy/ym89zF+Tj0SiPQVxNc59m3c4o1wOb 7CZYnNl5cPAc+EHgDI7EYDdA3vQY9zL10s7NCQoiBC16l2i6WExVBHST+CeOpe/MjM0/ VW5s/2WgD+CSMfm/uwt0Y1ZtKaGcQ1EgD57OfZoyc8i+i8g6z5UqXbrVXl/cnfeIAPG4 89TocARKAFY6bKxFP07vR95/84HpBEWcXWQbEI5lvLYzwSj8KqMd2VhLHcIGXXISPM7y Orag1l8CxCpPZ//BUwWchyK04vw3INcXHg13XCW7mEUUCVbofdB686r4BdRqxSz5yWgd NuwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=q1MMEMfBo1sJHXYUKqbcpK73d7zf8s6y5Z1KqWkpXu0=; b=ZOLg+4cRHO2822lsGMaMUUPSFqOag+MF2534XUAjsWkMDu1WXBLkLjwu7/s1QgvpoU zB1VU9cSveDL68zKvJHWF/GZsfIfO5Fw0yQuKzC/wBTWHvIkFu3VxxjOqXF1hw7BCVg9 M5kSeHkoEvI/JILsDlYW2/+xIET/Z2UijQ9HXwtWgelWTyXkdtPA8+i0QdFC97k9DC/k ErYxOTiQaDyvQLGGmzeYRS7bjBEwhomCwhfhHpQhLNX0McLov1dNm3BMbvhh2Rl5R9JS KsD4LwXugyJt/gd3m1nBrI7/dY7SNQ1cj6Q4BmU1giIoXZRUp6SX1bFgmwgqIjQK7U7g J5VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si6703857pgc.316.2018.03.23.14.47.25; Fri, 23 Mar 2018 14:47:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbeCWVqV (ORCPT + 99 others); Fri, 23 Mar 2018 17:46:21 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:42442 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbeCWVqT (ORCPT ); Fri, 23 Mar 2018 17:46:19 -0400 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ezUVk-0003UO-GT; Fri, 23 Mar 2018 22:46:08 +0100 Date: Fri, 23 Mar 2018 22:46:08 +0100 (CET) From: Thomas Gleixner To: Steven Rostedt cc: LKML , "Paul E. McKenney" , Peter Zijlstra , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , netdev@vger.kernel.org, James Chapman Subject: Re: rcu: Add might_sleep() check to synchronize_rcu() In-Reply-To: <20180323174023.60579f45@gandalf.local.home> Message-ID: References: <20180323172843.763579a9@gandalf.local.home> <20180323174023.60579f45@gandalf.local.home> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Mar 2018, Steven Rostedt wrote: > On Fri, 23 Mar 2018 22:33:29 +0100 (CET) > [ 150.741223] [] synchronize_rcu+0x27/0x90 > [ 150.746908] [] __l2tp_session_unhash+0x3d5/0x550 > > Looks like __l2tp_session_unhash() is the real culprit here. Yes. I reported that to netdev already. > [ 150.753281] [] ? __l2tp_session_unhash+0x1bf/0x550 > [ 150.759828] [] ? __local_bh_enable_ip+0x6a/0xd0 > [ 150.766123] [] ? l2tp_udp_encap_recv+0xd90/0xd90 > [ 150.772497] [] l2tp_tunnel_closeall+0x1e7/0x3a0 > [ 150.778782] [] l2tp_tunnel_destruct+0x30e/0x5a0 > [ 150.785067] [] ? l2tp_tunnel_destruct+0x1aa/0x5a0 > [ 150.791537] [] ? l2tp_tunnel_del_work+0x460/0x460 > [ 150.797997] [] __sk_destruct+0x53/0x570 > [ 150.803588] [] rcu_process_callbacks+0x898/0x1300 > [ 150.810048] [] ? rcu_process_callbacks+0x977/0x1300 > [ 150.816684] [] ? __sk_dst_check+0x240/0x240 > [ 150.822625] [] __do_softirq+0x206/0x951 > [ 150.828223] [] irq_exit+0x165/0x190 > [ 150.833557] [] smp_apic_timer_interrupt+0x7b/0xa0 > [ 150.840018] [] apic_timer_interrupt+0xa0/0xb0 > [ 150.846132] [ 150.848166] [] ? native_safe_halt+0x6/0x10 > [ 150.854036] [] ? trace_hardirqs_on+0xd/0x10 > [ 150.859973] [] default_idle+0x55/0x360 > [ 150.865478] [] arch_cpu_idle+0xa/0x10 > > I think you want this instead, as __l2tp_session_unhash is what looks > like might be hiding the call to synchronize_rcu(). It's not called in > all instances, and I don't think your patch would have triggered the > issues before hand. You want this: > > diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c > index 194a7483bb93..857b494bee29 100644 > --- a/net/l2tp/l2tp_core.c > +++ b/net/l2tp/l2tp_core.c > @@ -1677,6 +1677,8 @@ void __l2tp_session_unhash(struct l2tp_session *session) > { > struct l2tp_tunnel *tunnel = session->tunnel; > > + might_sleep(); > + > /* Remove the session from core hashes */ > if (tunnel) { > /* Remove from the per-tunnel hash */ That too :)