Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267385AbUJWFtw (ORCPT ); Sat, 23 Oct 2004 01:49:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267618AbUJWFtd (ORCPT ); Sat, 23 Oct 2004 01:49:33 -0400 Received: from smtp209.mail.sc5.yahoo.com ([216.136.130.117]:41061 "HELO smtp209.mail.sc5.yahoo.com") by vger.kernel.org with SMTP id S267385AbUJWFsp (ORCPT ); Sat, 23 Oct 2004 01:48:45 -0400 Message-ID: <4179F0B9.20908@yahoo.com.au> Date: Sat, 23 Oct 2004 15:48:41 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 X-Accept-Language: en MIME-Version: 1.0 To: Lee Revell CC: root@chaos.analogic.com, Linux kernel Subject: Re: printk() with a spin-lock held. References: <1098503815.13176.2.camel@krustophenia.net> In-Reply-To: <1098503815.13176.2.camel@krustophenia.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 816 Lines: 29 Lee Revell wrote: > On Fri, 2004-10-22 at 15:07 -0400, Richard B. Johnson wrote: > >>Linux-2.6.9 will bug-check and halt if my code executes >>a printk() with a spin-lock held. >> >>Is this the intended behavior? > > > Yes. printk() can sleep. No sleeping with a spinlock held. > You can call printk anywhere (except from the scheduler). Or if you're doing tricky things with preempt. > >>If so, NotGood(tm). > > > See above. If you think you can improve the situation, patches are > welcome, as always. > In this case, the patch would be to himself though. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/