<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-24T03:46:22Z</updated>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2015-08-24T03:46:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-24T03:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d683477020be2036d6c2d7d2cd3ffac4f2acbd6c'/>
<id>urn:sha1:d683477020be2036d6c2d7d2cd3ffac4f2acbd6c</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "A couple of major (hang and deadlock) fixes with fortunately fairly
  rare triggering conditions.  The PM oops is only really triggered by
  people using enclosure services (rare) and the fnic driver is mostly
  used in enterprise environments"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  SCSI: Fix NULL pointer dereference in runtime PM
  fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack
</content>
</entry>
<entry>
<title>SCSI: Fix NULL pointer dereference in runtime PM</title>
<updated>2015-08-18T15:14:14Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2015-08-17T15:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49718f0fb8c9af192b33d8af3a2826db04025371'/>
<id>urn:sha1:49718f0fb8c9af192b33d8af3a2826db04025371</id>
<content type='text'>
The routines in scsi_rpm.c assume that if a runtime-PM callback is
invoked for a SCSI device, it can only mean that the device's driver
has asked the block layer to handle the runtime power management (by
calling blk_pm_runtime_init(), which among other things sets q-&gt;dev).

However, this assumption turns out to be wrong for things like the ses
driver.  Normally ses devices are not allowed to do runtime PM, but
userspace can override this setting.  If this happens, the kernel gets
a NULL pointer dereference when blk_post_runtime_resume() tries to use
the uninitialized q-&gt;dev pointer.

This patch fixes the problem by calling the block layer's runtime-PM
routines only if the device's driver really does have a runtime-PM
callback routine.  Since ses doesn't define any such callbacks, the
crash won't occur.

This fixes Bugzilla #101371.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Stanisław Pitucha &lt;viraptor@gmail.com&gt;
Reported-by: Ilan Cohen &lt;ilanco@gmail.com&gt;
Tested-by: Ilan Cohen &lt;ilanco@gmail.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack</title>
<updated>2015-08-18T15:11:23Z</updated>
<author>
<name>Hiral Shah</name>
<email>hishah@cisco.com</email>
</author>
<published>2015-07-14T14:08:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db196935d9562abec4510f48d887bc1f1e054fcf'/>
<id>urn:sha1:db196935d9562abec4510f48d887bc1f1e054fcf</id>
<content type='text'>
We added changes in fnic driver patch 1.6.0.16 to acquire
io_req_lock in fnic_queuecommand() before issuing I/O so that io completion
is serialized. But when releasing the lock we check for the I/O flag and
this could be modified if IO abort occurs before I/O completion. In this case
we wont release the lock and causes deadlock in some scenerios. Using the
local variable to check the IO lock status will resolve the problem.

Fixes: 41df7b02db82cf6c14f094757bac3830d10a827f
Signed-off-by: Hiral Shah &lt;hishah@cisco.com&gt;
Signed-off-by: Sesidhar Baddela &lt;sebaddel@cisco.com&gt;
Signed-off-by: Anil Chintalapati &lt;achintal@cisco.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata</title>
<updated>2015-08-17T23:20:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-17T23:20:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e7fca0d0afdfa6be0f429f9a2649b3cf92197e7'/>
<id>urn:sha1:4e7fca0d0afdfa6be0f429f9a2649b3cf92197e7</id>
<content type='text'>
Pull libata fixes from Tejun Heo:
 "Three minor device-specific fixes and revert of NCQ autosense added
  during this -rc1.

  It turned out that NCQ autosense as currently implemented interferes
  with the usual error handling behavior.  It will be revisited in the
  near future"

* 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ata: ahci_brcmstb: Fix misuse of IS_ENABLED
  sata_sx4: Check return code from pdc20621_i2c_read()
  Revert "libata: Implement NCQ autosense"
  Revert "libata: Implement support for sense data reporting"
  Revert "libata-eh: Set 'information' field for autosense"
  ata: ahci_brcmstb: Fix warnings with CONFIG_PM_SLEEP=n
</content>
</entry>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2015-08-15T20:54:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-15T20:54:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1efdb5f0a9243ca8f3460a5ce1b407b06a021f02'/>
<id>urn:sha1:1efdb5f0a9243ca8f3460a5ce1b407b06a021f02</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "This has two libfc fixes for bugs causing rare crashes, one iscsi fix
  for a potential hang on shutdown, and a fix for an I/O blocksize issue
  which caused a regression"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  sd: Fix maximum I/O size for BLOCK_PC requests
  libfc: Fix fc_fcp_cleanup_each_cmd()
  libfc: Fix fc_exch_recv_req() error path
  libiscsi: Fix host busy blocking during connection teardown
</content>
</entry>
<entry>
<title>sd: Fix maximum I/O size for BLOCK_PC requests</title>
<updated>2015-08-12T18:54:37Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2015-06-23T16:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f258a46346c03fa0bbb6199ffaf4e1f9f599660'/>
<id>urn:sha1:4f258a46346c03fa0bbb6199ffaf4e1f9f599660</id>
<content type='text'>
Commit bcdb247c6b6a ("sd: Limit transfer length") clamped the maximum
size of an I/O request to the MAXIMUM TRANSFER LENGTH field in the BLOCK
LIMITS VPD. This had the unfortunate effect of also limiting the maximum
size of non-filesystem requests sent to the device through sg/bsg.

Avoid using blk_queue_max_hw_sectors() and set the max_sectors queue
limit directly.

Also update the comment in blk_limits_max_hw_sectors() to clarify that
max_hw_sectors defines the limit for the I/O controller only.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reported-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Tested-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>libfc: Fix fc_fcp_cleanup_each_cmd()</title>
<updated>2015-08-12T18:24:21Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2015-06-05T21:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f2777f53e3d5ad8ef2a176a4463a5c8e1a16431'/>
<id>urn:sha1:8f2777f53e3d5ad8ef2a176a4463a5c8e1a16431</id>
<content type='text'>
Since fc_fcp_cleanup_cmd() can sleep this function must not
be called while holding a spinlock. This patch avoids that
fc_fcp_cleanup_each_cmd() triggers the following bug:

BUG: scheduling while atomic: sg_reset/1512/0x00000202
1 lock held by sg_reset/1512:
 #0:  (&amp;(&amp;fsp-&gt;scsi_pkt_lock)-&gt;rlock){+.-...}, at: [&lt;ffffffffc0225cd5&gt;] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Preemption disabled at:[&lt;ffffffffc0225cd5&gt;] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Call Trace:
 [&lt;ffffffff816c612c&gt;] dump_stack+0x4f/0x7b
 [&lt;ffffffff810828bc&gt;] __schedule_bug+0x6c/0xd0
 [&lt;ffffffff816c87aa&gt;] __schedule+0x71a/0xa10
 [&lt;ffffffff816c8ad2&gt;] schedule+0x32/0x80
 [&lt;ffffffffc0217eac&gt;] fc_seq_set_resp+0xac/0x100 [libfc]
 [&lt;ffffffffc0218b11&gt;] fc_exch_done+0x41/0x60 [libfc]
 [&lt;ffffffffc0225cff&gt;] fc_fcp_cleanup_each_cmd.isra.21+0xcf/0x150 [libfc]
 [&lt;ffffffffc0225f43&gt;] fc_eh_device_reset+0x1c3/0x270 [libfc]
 [&lt;ffffffff814a2cc9&gt;] scsi_try_bus_device_reset+0x29/0x60
 [&lt;ffffffff814a3908&gt;] scsi_ioctl_reset+0x258/0x2d0
 [&lt;ffffffff814a2650&gt;] scsi_ioctl+0x150/0x440
 [&lt;ffffffff814b3a9d&gt;] sd_ioctl+0xad/0x120
 [&lt;ffffffff8132f266&gt;] blkdev_ioctl+0x1b6/0x810
 [&lt;ffffffff811da608&gt;] block_ioctl+0x38/0x40
 [&lt;ffffffff811b4e08&gt;] do_vfs_ioctl+0x2f8/0x530
 [&lt;ffffffff811b50c1&gt;] SyS_ioctl+0x81/0xa0
 [&lt;ffffffff816cf8b2&gt;] system_call_fastpath+0x16/0x7a

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>libfc: Fix fc_exch_recv_req() error path</title>
<updated>2015-08-12T18:23:30Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2015-06-05T21:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6979adeaab578f8ca14fdd32b06ddee0d9d3314'/>
<id>urn:sha1:f6979adeaab578f8ca14fdd32b06ddee0d9d3314</id>
<content type='text'>
Due to patch "libfc: Do not invoke the response handler after
fc_exch_done()" (commit ID 7030fd62) the lport_recv() call
in fc_exch_recv_req() is passed a dangling pointer. Avoid this
by moving the fc_frame_free() call from fc_invoke_resp() to its
callers. This patch fixes the following crash:

general protection fault: 0000 [#3] PREEMPT SMP
RIP: fc_lport_recv_req+0x72/0x280 [libfc]
Call Trace:
 fc_exch_recv+0x642/0xde0 [libfc]
 fcoe_percpu_receive_thread+0x46a/0x5ed [fcoe]
 kthread+0x10a/0x120
 ret_from_fork+0x42/0x70

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>libiscsi: Fix host busy blocking during connection teardown</title>
<updated>2015-08-12T17:21:20Z</updated>
<author>
<name>John Soni Jose</name>
<email>sony.john@avagotech.com</email>
</author>
<published>2015-06-24T01:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=660d0831d1494a6837b2f810d08b5be092c1f31d'/>
<id>urn:sha1:660d0831d1494a6837b2f810d08b5be092c1f31d</id>
<content type='text'>
In case of hw iscsi offload, an host can have N-number of active
connections. There can be IO's running on some connections which
make host-&gt;host_busy always TRUE. Now if logout from a connection
is tried then the code gets into an infinite loop as host-&gt;host_busy
is always TRUE.

 iscsi_conn_teardown(....)
 {
   .........
    /*
     * Block until all in-progress commands for this connection
     * time out or fail.
     */
     for (;;) {
      spin_lock_irqsave(session-&gt;host-&gt;host_lock, flags);
      if (!atomic_read(&amp;session-&gt;host-&gt;host_busy)) { /* OK for ERL == 0 */
	      spin_unlock_irqrestore(session-&gt;host-&gt;host_lock, flags);
              break;
      }
     spin_unlock_irqrestore(session-&gt;host-&gt;host_lock, flags);
     msleep_interruptible(500);
     iscsi_conn_printk(KERN_INFO, conn, "iscsi conn_destroy(): "
                 "host_busy %d host_failed %d\n",
	          atomic_read(&amp;session-&gt;host-&gt;host_busy),
	          session-&gt;host-&gt;host_failed);

	................
	...............
     }
  }

This is not an issue with software-iscsi/iser as each cxn is a separate
host.

Fix:
Acquiring eh_mutex in iscsi_conn_teardown() before setting
session-&gt;state = ISCSI_STATE_TERMINATE.

Signed-off-by: John Soni Jose &lt;sony.john@avagotech.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Chris Leech &lt;cleech@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>Revert "libata-eh: Set 'information' field for autosense"</title>
<updated>2015-08-03T15:41:33Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2015-08-03T15:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe16d4f202c59a560533a223bc6375739ee30944'/>
<id>urn:sha1:fe16d4f202c59a560533a223bc6375739ee30944</id>
<content type='text'>
This reverts commit a1524f226a02aa6edebd90ae0752e97cfd78b159.

As implemented, ACS-4 sense reporting for ATA devices bypasses error
diagnosis and handling in libata degrading EH behavior significantly.
Revert the related changes for now.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: stable@vger.kernel.org #v4.1+
</content>
</entry>
</feed>
