From: Greg KH Subject: Re: scsi calls kobject_put() in atomic context Date: Tue, 17 Jan 2006 15:59:36 -0800 Message-ID: <20060117235936.GB16446@kroah.com> References: <20060117004217.6329a9a8.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail.kroah.org ([69.55.234.183]:23527 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S932481AbWARAXR (ORCPT ); Tue, 17 Jan 2006 19:23:17 -0500 Content-Disposition: inline In-Reply-To: <20060117004217.6329a9a8.akpm@osdl.org> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Andrew Morton Cc: James Bottomley , linux-scsi@vger.kernel.org On Tue, Jan 17, 2006 at 12:42:17AM -0800, Andrew Morton wrote: > > So Greg added a might_sleep() to kobject_put(). Because on the final put() > it will indeed do sleepy things. > > Debug: sleeping function called from invalid context at drivers/base/core.c:343 > in_atomic():1, irqs_disabled():0 > > Call Trace: {__might_sleep+190} > {put_device+27} {scsi_put_command+186} > {scsi_next_command+45} {scsi_end_request+197} > {scsi_io_completion+447} {sd_rw_intr+559} > {scsi_finish_command+148} {scsi_softirq_done+220} > {blk_done_softirq+127} {__do_softirq+75} > {call_softirq+30} {do_softirq+51} > {irq_exit+63} {do_IRQ+55} > {mwait_idle+0} {ret_from_intr+0} > {mwait_idle+0} {mwait_idle+58} > {cpu_idle+100} {start_secondary+1155} > > I guess we already knew about that problem. Greg, I'll need to drop the > patch to be able to make a halfway releasable kernel. Heh, and you wanted me to add it to catch these kinds of things in the first place :) Oh well, greg k-h