<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/scsi, branch v3.1.3</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>aacraid: controller hangs if kernel uses non-default ASPM policy</title>
<updated>2011-11-26T17:08:33+00:00</updated>
<author>
<name>Vasily Averin</name>
<email>vvs@parallels.com</email>
</author>
<published>2011-11-11T09:42:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=49d1df8852cb97340c7b0fa31f4aa9be6ec8b759'/>
<id>49d1df8852cb97340c7b0fa31f4aa9be6ec8b759</id>
<content type='text'>
commit cf16123c9c8e346ed1dd171295a678d77648d7f8 upstream.

Aacraid controller can hang on some nodes if kernel uses non-default
(powersave) ASPM policy.  Controller hangs shortly after successful load and
hardware detection. Scsi error handler detects this hang and tries to restart
hardware but it does not help.

Initially it was noticed on RHEL6-based openVZ kernel after backporting
aacraid driver from mainline (RHEL6 kernel with original driver works well)
http://bugzilla.openvz.org/show_bug.cgi?id=2043

This issue happens because default ASPM policy was changed in Red Hat
kernels. Therefore guys from Red Hat have noticed this problem long time ago:
on Fedora 12
 https://bugzilla.redhat.com/show_bug.cgi?id=540478
on Fedora 14
 https://bugzilla.redhat.com/show_bug.cgi?id=679385

In RHEL6 kernel this issue was fixed, ASPM was disabled in aacraid driver. In
kernel changelog I've found that seems it was done by Matthew Garrett: -
[scsi] aacraid: Disable ASPM by default (Matthew Garrett) [599735]

However seems this patch was not submitted to mainline. I've reproduced this
issue on vanilla 3.1.0 kernel booted with "pcie_aspm.policy=powersave" option,
So I believe it makes sense to do it now.

Signed-off-by:	Vasily Averin &lt;vvs@sw.ru&gt;
[mjg: Checking the Windows drivers indicates that they disable ASPM under all
circumstances, so:]
Acked-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Achim Leubner &lt;Achim_Leubner@pmc-sierra.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cf16123c9c8e346ed1dd171295a678d77648d7f8 upstream.

Aacraid controller can hang on some nodes if kernel uses non-default
(powersave) ASPM policy.  Controller hangs shortly after successful load and
hardware detection. Scsi error handler detects this hang and tries to restart
hardware but it does not help.

Initially it was noticed on RHEL6-based openVZ kernel after backporting
aacraid driver from mainline (RHEL6 kernel with original driver works well)
http://bugzilla.openvz.org/show_bug.cgi?id=2043

This issue happens because default ASPM policy was changed in Red Hat
kernels. Therefore guys from Red Hat have noticed this problem long time ago:
on Fedora 12
 https://bugzilla.redhat.com/show_bug.cgi?id=540478
on Fedora 14
 https://bugzilla.redhat.com/show_bug.cgi?id=679385

In RHEL6 kernel this issue was fixed, ASPM was disabled in aacraid driver. In
kernel changelog I've found that seems it was done by Matthew Garrett: -
[scsi] aacraid: Disable ASPM by default (Matthew Garrett) [599735]

However seems this patch was not submitted to mainline. I've reproduced this
issue on vanilla 3.1.0 kernel booted with "pcie_aspm.policy=powersave" option,
So I believe it makes sense to do it now.

Signed-off-by:	Vasily Averin &lt;vvs@sw.ru&gt;
[mjg: Checking the Windows drivers indicates that they disable ASPM under all
circumstances, so:]
Acked-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Achim Leubner &lt;Achim_Leubner@pmc-sierra.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>hpsa: Disable ASPM</title>
<updated>2011-11-26T17:08:33+00:00</updated>
<author>
<name>Matthew Garrett</name>
<email>mjg@redhat.com</email>
</author>
<published>2011-11-11T16:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=611397f62fe6879f675587e62aa44b5a2a251569'/>
<id>611397f62fe6879f675587e62aa44b5a2a251569</id>
<content type='text'>
commit e5a44df85e8d78e5c2d3d2e4f59b460905691e2f upstream.

The Windows driver .inf disables ASPM on hpsa devices. Do the same because the
selection of a non default ASPM policy can cause the device to hang.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Mike Miller &lt;mike.miller@hp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e5a44df85e8d78e5c2d3d2e4f59b460905691e2f upstream.

The Windows driver .inf disables ASPM on hpsa devices. Do the same because the
selection of a non default ASPM policy can cause the device to hang.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Mike Miller &lt;mike.miller@hp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>fix WARNING: at drivers/scsi/scsi_lib.c:1704</title>
<updated>2011-11-26T17:08:33+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2011-11-07T14:51:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bf6f111b5e891b4cfbd4f966488fd824543ba2aa'/>
<id>bf6f111b5e891b4cfbd4f966488fd824543ba2aa</id>
<content type='text'>
commit 4e6c82b3614a18740ef63109d58743a359266daf upstream.

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

Caused by

commit f7c9c6bb14f3104608a3a83cadea10a6943d2804
Author: Anton Blanchard &lt;anton@samba.org&gt;
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 &lt;sfr@canb.auug.org.au&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4e6c82b3614a18740ef63109d58743a359266daf upstream.

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

Caused by

commit f7c9c6bb14f3104608a3a83cadea10a6943d2804
Author: Anton Blanchard &lt;anton@samba.org&gt;
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 &lt;sfr@canb.auug.org.au&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>hpsa: add small delay when using PCI Power Management to reset for kump</title>
<updated>2011-11-11T17:44:34+00:00</updated>
<author>
<name>Mike Miller</name>
<email>mike.miller@hp.com</email>
</author>
<published>2011-10-21T06:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e0aef70cc677fdfaa195b04eea389a9b9b40eeaa'/>
<id>e0aef70cc677fdfaa195b04eea389a9b9b40eeaa</id>
<content type='text'>
commit c4853efec665134b2e6fc9c13447323240980351 upstream.

The P600 requires a small delay when changing states. Otherwise we may think
the board did not reset and we bail. This for kdump only and is particular
to the P600.

Signed-off-by: Mike Miller &lt;mike.miller@hp.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c4853efec665134b2e6fc9c13447323240980351 upstream.

The P600 requires a small delay when changing states. Otherwise we may think
the board did not reset and we bail. This for kdump only and is particular
to the P600.

Signed-off-by: Mike Miller &lt;mike.miller@hp.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mpt2sas: Fix for system hang when discovery in progress</title>
<updated>2011-11-11T17:44:24+00:00</updated>
<author>
<name>nagalakshmi.nandigama@lsi.com</name>
<email>nagalakshmi.nandigama@lsi.com</email>
</author>
<published>2011-10-21T04:36:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=218782d30177214893625e8d6523191caa5e023b'/>
<id>218782d30177214893625e8d6523191caa5e023b</id>
<content type='text'>
commit 0167ac67ff6f35bf2364f7672c8012b0cd40277f upstream.

Fix for issue : While discovery is in progress, hot unplug and hot plug of
enclosure connected to the controller card is causing system to hang.

When a device is in the process of being detected at driver load time then
if it is removed, the device that is no longer present will not be added
to the list. So the code in _scsih_probe_sas() is rearranged as such so
the devices that failed to be detected are not added to the list.

Signed-off-by: Nagalakshmi Nandigama &lt;nagalakshmi.nandigama@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0167ac67ff6f35bf2364f7672c8012b0cd40277f upstream.

Fix for issue : While discovery is in progress, hot unplug and hot plug of
enclosure connected to the controller card is causing system to hang.

When a device is in the process of being detected at driver load time then
if it is removed, the device that is no longer present will not be added
to the list. So the code in _scsih_probe_sas() is rearranged as such so
the devices that failed to be detected are not added to the list.

Signed-off-by: Nagalakshmi Nandigama &lt;nagalakshmi.nandigama@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Fix block queue and elevator memory leak in scsi_alloc_sdev</title>
<updated>2011-11-11T17:44:23+00:00</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2011-11-02T21:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0224b906310fc773affedc88056e8d873617248'/>
<id>c0224b906310fc773affedc88056e8d873617248</id>
<content type='text'>
commit f7c9c6bb14f3104608a3a83cadea10a6943d2804 upstream.

When looking at memory consumption issues I noticed quite a
lot of memory in the kmalloc-2048 bucket:

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
  6561   6471  98%    2.30K    243       27     15552K kmalloc-2048

Over 15MB. slub debug shows that cfq is responsible for almost
all of it:

# sort -nr /sys/kernel/slab/kmalloc-2048/alloc_calls
6402 .cfq_init_queue+0xec/0x460 age=43423/43564/43655 pid=1 cpus=4,11,13

In scsi_alloc_sdev we do scsi_alloc_queue but if slave_alloc
fails we don't free it with scsi_free_queue.

The patch below fixes the issue:

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
   135     72  53%    2.30K      5       27       320K kmalloc-2048

# cat /sys/kernel/slab/kmalloc-2048/alloc_calls
3 .cfq_init_queue+0xec/0x460 age=3811/3876/3925 pid=1 cpus=4,11,13

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f7c9c6bb14f3104608a3a83cadea10a6943d2804 upstream.

When looking at memory consumption issues I noticed quite a
lot of memory in the kmalloc-2048 bucket:

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
  6561   6471  98%    2.30K    243       27     15552K kmalloc-2048

Over 15MB. slub debug shows that cfq is responsible for almost
all of it:

# sort -nr /sys/kernel/slab/kmalloc-2048/alloc_calls
6402 .cfq_init_queue+0xec/0x460 age=43423/43564/43655 pid=1 cpus=4,11,13

In scsi_alloc_sdev we do scsi_alloc_queue but if slave_alloc
fails we don't free it with scsi_free_queue.

The patch below fixes the issue:

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
   135     72  53%    2.30K      5       27       320K kmalloc-2048

# cat /sys/kernel/slab/kmalloc-2048/alloc_calls
3 .cfq_init_queue+0xec/0x460 age=3811/3876/3925 pid=1 cpus=4,11,13

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Make scsi_free_queue() kill pending SCSI commands</title>
<updated>2011-11-11T17:44:22+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2011-09-23T17:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a3576ddc753b2d9704a9e9b668becdee4c166c88'/>
<id>a3576ddc753b2d9704a9e9b668becdee4c166c88</id>
<content type='text'>
commit 3308511c93e6ad0d3c58984ecd6e5e57f96b12c8 upstream.

Make sure that SCSI device removal via scsi_remove_host() does finish
all pending SCSI commands. Currently that's not the case and hence
removal of a SCSI host during I/O can cause a deadlock. See also
"blkdev_issue_discard() hangs forever if underlying storage device is
removed" (http://bugzilla.kernel.org/show_bug.cgi?id=40472). See also
http://lkml.org/lkml/2011/8/27/6.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3308511c93e6ad0d3c58984ecd6e5e57f96b12c8 upstream.

Make sure that SCSI device removal via scsi_remove_host() does finish
all pending SCSI commands. Currently that's not the case and hence
removal of a SCSI host during I/O can cause a deadlock. See also
"blkdev_issue_discard() hangs forever if underlying storage device is
removed" (http://bugzilla.kernel.org/show_bug.cgi?id=40472). See also
http://lkml.org/lkml/2011/8/27/6.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_dh: check queuedata pointer before proceeding further</title>
<updated>2011-11-11T17:44:21+00:00</updated>
<author>
<name>Moger, Babu</name>
<email>Babu.Moger@netapp.com</email>
</author>
<published>2011-10-26T18:29:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2ac819e95c1cf0455ba22a8a295f0998df9e33c2'/>
<id>2ac819e95c1cf0455ba22a8a295f0998df9e33c2</id>
<content type='text'>
commit a18a920c70d48a8e4a2b750d8a183b3c1a4be514 upstream.

This patch validates sdev pointer in scsi_dh_activate before proceeding further.

Without this check we might see the panic as below. I have seen this
panic multiple times..

Call trace:

 #0 [ffff88007d647b50] machine_kexec at ffffffff81020902
 #1 [ffff88007d647ba0] crash_kexec at ffffffff810875b0
 #2 [ffff88007d647c70] oops_end at ffffffff8139c650
 #3 [ffff88007d647c90] __bad_area_nosemaphore at ffffffff8102dd15
 #4 [ffff88007d647d50] page_fault at ffffffff8139b8cf
    [exception RIP: scsi_dh_activate+0x82]
    RIP: ffffffffa0041922  RSP: ffff88007d647e00  RFLAGS: 00010046
    RAX: 0000000000000000  RBX: 0000000000000000  RCX: 00000000000093c5
    RDX: 00000000000093c5  RSI: ffffffffa02e6640  RDI: ffff88007cc88988
    RBP: 000000000000000f   R8: ffff88007d646000   R9: 0000000000000000
    R10: ffff880082293790  R11: 00000000ffffffff  R12: ffff88007cc88988
    R13: 0000000000000000  R14: 0000000000000286  R15: ffff880037b845e0
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0000
 #5 [ffff88007d647e38] run_workqueue at ffffffff81060268
 #6 [ffff88007d647e78] worker_thread at ffffffff81060386
 #7 [ffff88007d647ee8] kthread at ffffffff81064436
 #8 [ffff88007d647f48] kernel_thread at ffffffff81003fba

Signed-off-by: Babu Moger &lt;babu.moger@netapp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a18a920c70d48a8e4a2b750d8a183b3c1a4be514 upstream.

This patch validates sdev pointer in scsi_dh_activate before proceeding further.

Without this check we might see the panic as below. I have seen this
panic multiple times..

Call trace:

 #0 [ffff88007d647b50] machine_kexec at ffffffff81020902
 #1 [ffff88007d647ba0] crash_kexec at ffffffff810875b0
 #2 [ffff88007d647c70] oops_end at ffffffff8139c650
 #3 [ffff88007d647c90] __bad_area_nosemaphore at ffffffff8102dd15
 #4 [ffff88007d647d50] page_fault at ffffffff8139b8cf
    [exception RIP: scsi_dh_activate+0x82]
    RIP: ffffffffa0041922  RSP: ffff88007d647e00  RFLAGS: 00010046
    RAX: 0000000000000000  RBX: 0000000000000000  RCX: 00000000000093c5
    RDX: 00000000000093c5  RSI: ffffffffa02e6640  RDI: ffff88007cc88988
    RBP: 000000000000000f   R8: ffff88007d646000   R9: 0000000000000000
    R10: ffff880082293790  R11: 00000000ffffffff  R12: ffff88007cc88988
    R13: 0000000000000000  R14: 0000000000000286  R15: ffff880037b845e0
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0000
 #5 [ffff88007d647e38] run_workqueue at ffffffff81060268
 #6 [ffff88007d647e78] worker_thread at ffffffff81060386
 #7 [ffff88007d647ee8] kthread at ffffffff81064436
 #8 [ffff88007d647f48] kernel_thread at ffffffff81003fba

Signed-off-by: Babu Moger &lt;babu.moger@netapp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>st: fix race in st_scsi_execute_end</title>
<updated>2011-11-11T17:44:20+00:00</updated>
<author>
<name>Petr Uzel</name>
<email>petr.uzel@suse.cz</email>
</author>
<published>2011-10-21T11:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2753feb58ab8704715aace3ad49ec545ffa8b8a4'/>
<id>2753feb58ab8704715aace3ad49ec545ffa8b8a4</id>
<content type='text'>
commit c68bf8eeaa57c852e74adcf597237be149eef830 upstream.

The call to complete() in st_scsi_execute_end() wakes up sleeping thread
in write_behind_check(), which frees the st_request, thus invalidating
the pointer to the associated bio structure, which is then passed to the
blk_rq_unmap_user(). Fix by storing pointer to bio structure into
temporary local variable.

This bug is present since at least linux-2.6.32.

Signed-off-by: Petr Uzel &lt;petr.uzel@suse.cz&gt;
Reported-by: Juergen Groß &lt;juergen.gross@ts.fujitsu.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Acked-by: Kai Mäkisara &lt;kai.makisara@kolumbus.fi&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c68bf8eeaa57c852e74adcf597237be149eef830 upstream.

The call to complete() in st_scsi_execute_end() wakes up sleeping thread
in write_behind_check(), which frees the st_request, thus invalidating
the pointer to the associated bio structure, which is then passed to the
blk_rq_unmap_user(). Fix by storing pointer to bio structure into
temporary local variable.

This bug is present since at least linux-2.6.32.

Signed-off-by: Petr Uzel &lt;petr.uzel@suse.cz&gt;
Reported-by: Juergen Groß &lt;juergen.gross@ts.fujitsu.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Acked-by: Kai Mäkisara &lt;kai.makisara@kolumbus.fi&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>isci: fix missed unlock in apc_agent_timeout()</title>
<updated>2011-11-11T17:42:31+00:00</updated>
<author>
<name>Jeff Skirvin</name>
<email>jeffrey.d.skirvin@intel.com</email>
</author>
<published>2011-09-29T01:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=07cb3ce0ec51d6b51a0874a071825f210a850591'/>
<id>07cb3ce0ec51d6b51a0874a071825f210a850591</id>
<content type='text'>
commit 983d3fdd332742167d0482c06fd29cf4b8a687c0 upstream.

Needed to jump to scic_lock unlock.

Also spotted by coccicheck.

Signed-off-by: Jeff Skirvin &lt;jeffrey.d.skirvin@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 983d3fdd332742167d0482c06fd29cf4b8a687c0 upstream.

Needed to jump to scic_lock unlock.

Also spotted by coccicheck.

Signed-off-by: Jeff Skirvin &lt;jeffrey.d.skirvin@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
