mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk,
	James Bottomley <JBottomley@Parallels.com>
Subject: [02/53] [SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704
Date: Tue, 22 Nov 2011 16:23:09 -0800	[thread overview]
Message-ID: <20111123002404.779095515@clark.kroah.org> (raw)
In-Reply-To: <20111123002419.GA8531@kroah.com>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: James Bottomley <James.Bottomley@HansenPartnership.com>

commit 4e6c82b3614a18740ef63109d58743a359266daf upstream.

On Mon, 2011-11-07 at 17:24 +1100, Stephen Rothwell wrote:
> Hi all,
>
> Starting some time last week I am getting the following during boot on
> our PPC970 blade:
>
> calling  .ipr_init+0x0/0x68 @ 1
> ipr: IBM Power RAID SCSI Device Driver version: 2.5.2 (April 27, 2011)
> ipr 0000:01:01.0: Found IOA with IRQ: 26
> ipr 0000:01:01.0: Starting IOA initialization sequence.
> ipr 0000:01:01.0: Adapter firmware version: 06160039
> ipr 0000:01:01.0: IOA initialized.
> scsi0 : IBM 572E Storage Adapter
> ------------[ cut here ]------------
> WARNING: at drivers/scsi/scsi_lib.c:1704
> Modules linked in:
> NIP: c00000000053b3d4 LR: c00000000053e5b0 CTR: c000000000541d70
> REGS: c0000000783c2f60 TRAP: 0700   Not tainted  (3.1.0-autokern1)
> MSR: 8000000000029032 <EE,ME,CE,IR,DR>  CR: 24002024  XER: 20000002
> TASK = c0000000783b8000[1] 'swapper' THREAD: c0000000783c0000 CPU: 0
> GPR00: 0000000000000001 c0000000783c31e0 c000000000cf38b0 c00000000239a9d0
> GPR04: c000000000cbe8f8 0000000000000000 c0000000783c3040 0000000000000000
> GPR08: c000000075daf488 c000000078a3b7ff c000000000bcacc8 0000000000000000
> GPR12: 0000000044002028 c000000007ffb000 0000000002e40000 000000000099b800
> GPR16: 0000000000000000 c000000000bba5fc c000000000a61db8 0000000000000000
> GPR20: 0000000001b77200 0000000000000000 c000000078990000 0000000000000001
> GPR24: c000000002396828 0000000000000000 0000000000000000 c000000078a3b938
> GPR28: fffffffffffffffa c0000000008ad2c0 c000000000c7faa8 c00000000239a9d0
> NIP [c00000000053b3d4] .scsi_free_queue+0x24/0x90
> LR [c00000000053e5b0] .scsi_alloc_sdev+0x280/0x2e0
> Call Trace:
> [c0000000783c31e0] [c000000000c7faa8] wireless_seq_fops+0x278d0/0x2eb88 (unreliable)
> [c0000000783c3270] [c00000000053e5b0] .scsi_alloc_sdev+0x280/0x2e0
> [c0000000783c3330] [c00000000053eba0] .scsi_probe_and_add_lun+0x390/0xb40
> [c0000000783c34a0] [c00000000053f7ec] .__scsi_scan_target+0x16c/0x650
> [c0000000783c35f0] [c00000000053fd90] .scsi_scan_channel+0xc0/0x100
> [c0000000783c36a0] [c00000000053fefc] .scsi_scan_host_selected+0x12c/0x1c0
> [c0000000783c3750] [c00000000083dcb4] .ipr_probe+0x2c0/0x390
> [c0000000783c3830] [c0000000003f50b4] .local_pci_probe+0x34/0x50
> [c0000000783c38a0] [c0000000003f5f78] .pci_device_probe+0x148/0x150
> [c0000000783c3950] [c0000000004e1e8c] .driver_probe_device+0xdc/0x210
> [c0000000783c39f0] [c0000000004e20cc] .__driver_attach+0x10c/0x110
> [c0000000783c3a80] [c0000000004e1228] .bus_for_each_dev+0x98/0xf0
> [c0000000783c3b30] [c0000000004e1bf8] .driver_attach+0x28/0x40
> [c0000000783c3bb0] [c0000000004e07d8] .bus_add_driver+0x218/0x340
> [c0000000783c3c60] [c0000000004e2a2c] .driver_register+0x9c/0x1b0
> [c0000000783c3d00] [c0000000003f62d4] .__pci_register_driver+0x64/0x140
> [c0000000783c3da0] [c000000000b99f88] .ipr_init+0x4c/0x68
> [c0000000783c3e20] [c00000000000ad24] .do_one_initcall+0x1a4/0x1e0
> [c0000000783c3ee0] [c000000000b512d0] .kernel_init+0x14c/0x1fc
> [c0000000783c3f90] [c000000000022468] .kernel_thread+0x54/0x70
> Instruction dump:
> ebe1fff8 7c0803a6 4e800020 7c0802a6 fba1ffe8 fbe1fff8 7c7f1b78 f8010010
> f821ff71 e8030398 3120ffff 7c090110 <0b000000> e86303b0 482de065 60000000
> ---[ end trace 759bed76a85e8dec ]---
> scsi 0:0:1:0: Direct-Access     IBM-ESXS MAY2036RC        T106 PQ: 0 ANSI: 5
> ------------[ cut here ]------------
>
> I get lots more of these.  The obvious commit to point the finger at
> is 3308511c93e6 ("[SCSI] Make scsi_free_queue() kill pending SCSI
> commands") but the root cause may be something different.

Caused by

commit f7c9c6bb14f3104608a3a83cadea10a6943d2804
Author: Anton Blanchard <anton@samba.org>
Date:   Thu Nov 3 08:56:22 2011 +1100

    [SCSI] Fix block queue and elevator memory leak in scsi_alloc_sdev

Doesn't completely do the teardown.  The true fix is to do a proper
teardown instead of hand rolling it

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_scan.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -319,11 +319,7 @@ static struct scsi_device *scsi_alloc_sd
 	return sdev;
 
 out_device_destroy:
-	scsi_device_set_state(sdev, SDEV_DEL);
-	transport_destroy_device(&sdev->sdev_gendev);
-	put_device(&sdev->sdev_dev);
-	scsi_free_queue(sdev->request_queue);
-	put_device(&sdev->sdev_gendev);
+	__scsi_remove_device(sdev);
 out:
 	if (display_failure_msg)
 		printk(ALLOC_FAILURE_MSG, __func__);



  parent reply	other threads:[~2011-11-23  0:40 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  0:24 [00/53] 3.0.11-stable review Greg KH
2011-11-23  0:23 ` [01/53] genirq: Fix irqfixup, irqpoll regression Greg KH
2011-11-23  0:23 ` Greg KH [this message]
2011-11-23  0:23 ` [03/53] [SCSI] hpsa: Disable ASPM Greg KH
2011-11-23  0:23 ` [04/53] [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy Greg KH
2011-11-23  0:23 ` [05/53] [media] saa7164: Add support for another HVR2200 hardware revision Greg KH
2011-11-23  0:23 ` [06/53] drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend Greg KH
2011-11-23  0:23 ` [07/53] ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ Greg KH
2011-11-23  0:23 ` [08/53] Net, libertas: Resolve memory leak in if_spi_host_to_card() Greg KH
2011-11-23  0:23 ` [09/53] rt2x00: Fix sleep-while-atomic bug in powersaving code Greg KH
2011-11-23  0:23 ` [10/53] mac80211: fix NULL dereference in radiotap code Greg KH
2011-11-23  0:23 ` [11/53] mac80211: fix bug in ieee80211_build_probe_req Greg KH
2011-11-23  0:23 ` [12/53] nl80211: fix HT capability attribute validation Greg KH
2011-11-23  0:23 ` [13/53] cfg80211: fix bug on regulatory core exit on access to last_request Greg KH
2011-11-23  0:23 ` [14/53] ip6_tunnel: copy parms.name after register_netdevice Greg KH
2011-11-23  0:23 ` [15/53] PM / driver core: disable devices runtime PM during shutdown Greg KH
2011-11-23  0:23 ` [16/53] pch_phub: Support new device LAPIS Semiconductor ML7831 IOH Greg KH
2011-11-23  0:23 ` [17/53] pch_phub: Fix MAC address writing issue for LAPIS ML7831 Greg KH
2011-11-23  0:23 ` [18/53] pch_uart: Fix hw-flow control issue Greg KH
2011-11-23  0:23 ` [19/53] pch_uart: Fix DMA resource leak issue Greg KH
2011-11-23  0:23 ` [20/53] pch_uart: Support new device LAPIS Semiconductor ML7831 IOH Greg KH
2011-11-23  0:23 ` [21/53] tty: hvc_dcc: Fix duplicate character inputs Greg KH
2011-11-23  0:23 ` [22/53] TTY: ldisc, allow waiting for ldisc arbitrarily long Greg KH
2011-11-23  0:23 ` [23/53] TTY: ldisc, move wait idle to caller Greg KH
2011-11-23  0:23 ` [24/53] TTY: ldisc, wait for ldisc infinitely in hangup Greg KH
2011-11-23  0:23 ` [25/53] nfs: when attempting to open a directory, fall back on normal lookup (try #5) Greg KH
2011-11-23  0:23 ` [26/53] pcie-gadget-spear: Add "platform:" prefix for platform modalias Greg KH
2011-11-23  0:23 ` [27/53] drivers/base/node.c: fix compilation error with older versions of gcc Greg KH
2011-11-23  0:23 ` [28/53] xhci: Set slot and ep0 flags for address command Greg KH
2011-11-23  0:23 ` [29/53] usb, xhci: Clear warm reset change event during init Greg KH
2011-11-23  0:23 ` [30/53] usb, xhci: fix lockdep warning on endpoint timeout Greg KH
2011-11-23  0:23 ` [31/53] USB: XHCI: resume root hubs when the controller resumes Greg KH
2011-11-23  0:23 ` [32/53] USB: option: release new PID for ZTE 3G modem Greg KH
2011-11-23  0:23 ` [33/53] USB: option: add PID of Huawei E173s " Greg KH
2011-11-23  0:23 ` [34/53] USB: serial: pl2303: rm duplicate id Greg KH
2011-11-23  0:23 ` [35/53] USB: cdc-acm: Fix disconnect() vs close() race Greg KH
2011-11-23  0:23 ` [36/53] USB: workaround for bug in old version of GCC Greg KH
2011-11-23  0:23 ` [37/53] USB: ark3116 initialisation fix Greg KH
2011-11-23  0:23 ` [38/53] USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c Greg KH
2011-11-23  0:23 ` [39/53] usb-storage: Accept 8020i-protocol commands longer than 12 bytes Greg KH
2011-11-23  0:23 ` [40/53] USB: EHCI: fix HUB TT scheduling issue with iso transfer Greg KH
2011-11-23  0:23 ` [41/53] USB: add quirk for Logitech C600 web cam Greg KH
2011-11-23  0:23 ` [42/53] USB: quirks: adding more quirky webcams to avoid squeaky audio Greg KH
2011-11-23  0:23 ` [43/53] xfs: fix error handling for synchronous writes Greg KH
2011-11-23  0:23 ` [44/53] xfs: fix xfs_mark_inode_dirty during umount Greg KH
2011-11-23  0:23 ` [45/53] xfs: dont serialise direct IO reads on page cache Greg KH
2011-11-23  0:23 ` [46/53] xfs: avoid direct I/O write vs buffered I/O race Greg KH
2011-11-23  0:23 ` [47/53] xfs: Return -EIO when xfs_vn_getattr() failed Greg KH
2011-11-23  0:23 ` [48/53] xfs: fix buffer flushing during unmount Greg KH
2011-11-23  0:23 ` [49/53] xfs: Fix possible memory corruption in xfs_readlink Greg KH
2011-11-23  0:23 ` [50/53] xfs: use doalloc flag in xfs_qm_dqattach_one() Greg KH
2011-11-23  0:23 ` [51/53] xfs: fix ->write_inode return values Greg KH
2011-11-23  0:23 ` [52/53] drm/i915: fix IVB cursor support Greg KH
2011-11-23  0:24 ` [53/53] drm/i915: always set FDI composite sync bit Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111123002404.779095515@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=JBottomley@Parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®