From: Andrew Morton Subject: scsi calls kobject_put() in atomic context Date: Tue, 17 Jan 2006 00:42:17 -0800 Message-ID: <20060117004217.6329a9a8.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.osdl.org ([65.172.181.4]:40141 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932312AbWAQImi (ORCPT ); Tue, 17 Jan 2006 03:42:38 -0500 Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Greg KH , James Bottomley Cc: linux-scsi@vger.kernel.org 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.