From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757459AbcAaMiz (ORCPT ); Sun, 31 Jan 2016 07:38:55 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36733 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757388AbcAaMix (ORCPT ); Sun, 31 Jan 2016 07:38:53 -0500 Date: Sun, 31 Jan 2016 21:40:08 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: akpm@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, akinobu.mita@gmail.com, jack@suse.cz, sergey.senozhatsky.work@gmail.com, peter@hurleysoftware.com, torvalds@linux-foundation.org Subject: Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code Message-ID: <20160131124007.GB1306@swordfish> References: <1454071417-20685-1-git-send-email-byungchul.park@lge.com> <20160129125457.GI31266@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160129125457.GI31266@X58A-UD3R> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (01/29/16 21:54), Byungchul Park wrote: > Hello, Andrew > > Please take this v5 patch instead of v2 patch, which you took. Or give your > opinion. > > > It causes an infinite recursive cycle when using CONFIG_DEBUG_SPINLOCK, > > in the spin_dump(). Backtrace prints printk() -> console_trylock() -> > > do_raw_spin_lock() -> spin_dump() -> printk()... infinitely. > > > > When the spin_dump() is called from printk(), we should prevent the > > debug spinlock code from calling printk() again in that context. It's > > reasonable to avoid printing "lockup suspected" which is just a warning > > message but it would cause a real lockup definitely. Hello Byungchul, thanks for the patch and thanks for bringing this topic to discussion. let's not rush, if you don't mind, and return back for a bit. there are some serious cases (when we really would want to see a spin_dump output) that are broken. -ss