Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbdI1Qa5 (ORCPT ); Thu, 28 Sep 2017 12:30:57 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51342 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbdI1Qa4 (ORCPT ); Thu, 28 Sep 2017 12:30:56 -0400 Date: Thu, 28 Sep 2017 09:30:48 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: "Levin, Alexander (Sasha Levin)" , Sasha Levin , "linux-kernel@vger.kernel.org List" , Ingo Molnar , "jiangshanlai@gmail.com" , "dipankar@in.ibm.com" , Andrew Morton , Mathieu Desnoyers , Josh Triplett , Thomas Gleixner , Steven Rostedt , "dhowells@redhat.com" , Eric Dumazet , Fr?d?ric Weisbecker , Oleg Nesterov , "bobby.prani@gmail.com" Subject: Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Reply-To: paulmck@linux.vnet.ibm.com References: <20170419165805.GB10874@linux.vnet.ibm.com> <1492621117-13939-40-git-send-email-paulmck@linux.vnet.ibm.com> <20170928123055.GI3521@linux.vnet.ibm.com> <20170928153813.7cernglt2d7umhpe@sasha-lappy> <20170928160514.GM3521@linux.vnet.ibm.com> <20170928161850.rud7fmiaxwhch6fu@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928161850.rud7fmiaxwhch6fu@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17092816-0052-0000-0000-0000026920DA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007805; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000232; SDB=6.00923656; UDB=6.00464366; IPR=6.00703794; BA=6.00005613; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017306; XFM=3.00000015; UTC=2017-09-28 16:30:52 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092816-0053-0000-0000-0000522739DF Message-Id: <20170928163047.GP3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-28_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709280244 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1377 Lines: 29 On Thu, Sep 28, 2017 at 06:18:50PM +0200, Peter Zijlstra wrote: > On Thu, Sep 28, 2017 at 09:05:14AM -0700, Paul E. McKenney wrote: > > > do_async_page_fault+0x72/0x90 arch/x86/kernel/kvm.c:271 > > > async_page_fault+0x22/0x30 arch/x86/entry/entry_64.S:1069 > > > RIP: 0010:format_decode+0x240/0x830 lib/vsprintf.c:1996 > > > RSP: 0018:ffff88003b2df520 EFLAGS: 00010283 > > > RAX: 000000000000003f RBX: ffffffffb5d1e141 RCX: ffff88003b2df670 > > > RDX: 0000000000000001 RSI: dffffc0000000000 RDI: ffffffffb5d1e140 > > > RBP: ffff88003b2df560 R08: dffffc0000000000 R09: 0000000000000000 > > > R10: ffff88003b2df718 R11: 0000000000000000 R12: ffff88003b2df5d8 > > > R13: 0000000000000064 R14: ffffffffb5d1e140 R15: 0000000000000000 > > > vsnprintf+0x173/0x1700 lib/vsprintf.c:2136 > > > > We took a page fault in vsnprintf() while doing link_path_walk(), > > which looks to be within an RCU read-side critical section. > > > > Maybe the page fault confused lockdep? > > > > Sigh. It is going to be a real pain if all printk()s need to be > > outside of RCU read-side critical sections due to the possibility of > > page faults... > > printk() _should_ not fault AFAIK. If it does, you've done something > dodgy. And we really do have a page fault there. Perhaps the fault of the caller of printk(), printing some memory that is, as you say, dodgy? Thanx, Paul