From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753778AbcA0GN4 (ORCPT ); Wed, 27 Jan 2016 01:13:56 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:53820 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbcA0GNt (ORCPT ); Wed, 27 Jan 2016 01:13:49 -0500 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Wed, 27 Jan 2016 15:13:26 +0900 From: Byungchul Park To: Sergey Senozhatsky Cc: akpm@linux-foundation.org, akinobu.mita@gmail.com, jack@suse.cz, mingo@kernel.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: + lib-spinlock_debugc-prevent-an-infinite-recursive-cycle-in-spin_dump.patch added to -mm tree Message-ID: <20160127061325.GA1538@X58A-UD3R> References: <56a80b84.OHhjyfz52dk/E3qw%akpm@linux-foundation.org> <20160127011454.GB1612@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160127011454.GB1612@swordfish> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2016 at 10:14:54AM +0900, Sergey Senozhatsky wrote: > On (01/26/16 16:12), akpm@linux-foundation.org wrote: > [..] > > There is an infinite recursive cycle when using CONFIG_DEBUG_SPINLOCK, in > > spin_dump(). Backtrace prints printk() -> console_trylock() -> > > do_raw_spin_lock() -> spin_bug() -> spin_dump() -> printk()... > > infinitely. > > is it even possible to lockup on a semaphore's spin_lock? > > int down_trylock(struct semaphore *sem) > { > unsigned long flags; > int count; > > raw_spin_lock_irqsave(&sem->lock, flags); > ^^^^ here? Yes. > under what circumstances and why it should be silenced? a memory corruption? > or is it the 'logbuf_lock' spin_lock that was meant to be in the report? Backtracing said it's console_sem.lock. But as you said, logbuf_lock can cause same lockup when trying printk() in printk(). > so if the CPU that owns the spin_lock somehow managed to keep it forever > (due to a memory corruption... or something has powered off the cpu > core???) -- then _this is_ the problem, not the fact that other CPUs will > not lock the spin_lock anymore. > > so I don't think this patch does the right thing, sorry. I agree with you. thanks, byungchul