<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/scsi, branch v4.9.20</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>scsi: libiscsi: add lock around task lists to fix list corruption regression</title>
<updated>2017-03-26T11:05:58+00:00</updated>
<author>
<name>Chris Leech</name>
<email>cleech@redhat.com</email>
</author>
<published>2017-02-28T00:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de1ff848c74fcc5b172323c1d5fac88dc1ab0281'/>
<id>de1ff848c74fcc5b172323c1d5fac88dc1ab0281</id>
<content type='text'>
commit 6f8830f5bbab16e54f261de187f3df4644a5b977 upstream.

There's a rather long standing regression from the commit "libiscsi:
Reduce locking contention in fast path"

Depending on iSCSI target behavior, it's possible to hit the case in
iscsi_complete_task where the task is still on a pending list
(!list_empty(&amp;task-&gt;running)).  When that happens the task is removed
from the list while holding the session back_lock, but other task list
modification occur under the frwd_lock.  That leads to linked list
corruption and eventually a panicked system.

Rather than back out the session lock split entirely, in order to try
and keep some of the performance gains this patch adds another lock to
maintain the task lists integrity.

Major enterprise supported kernels have been backing out the lock split
for while now, thanks to the efforts at IBM where a lab setup has the
most reliable reproducer I've seen on this issue.  This patch has been
tested there successfully.

Signed-off-by: Chris Leech &lt;cleech@redhat.com&gt;
Fixes: 659743b02c41 ("[SCSI] libiscsi: Reduce locking contention in fast path")
Reported-by: Prashantha Subbarao &lt;psubbara@us.ibm.com&gt;
Reviewed-by: Guilherme G. Piccoli &lt;gpiccoli@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

There's a rather long standing regression from the commit "libiscsi:
Reduce locking contention in fast path"

Depending on iSCSI target behavior, it's possible to hit the case in
iscsi_complete_task where the task is still on a pending list
(!list_empty(&amp;task-&gt;running)).  When that happens the task is removed
from the list while holding the session back_lock, but other task list
modification occur under the frwd_lock.  That leads to linked list
corruption and eventually a panicked system.

Rather than back out the session lock split entirely, in order to try
and keep some of the performance gains this patch adds another lock to
maintain the task lists integrity.

Major enterprise supported kernels have been backing out the lock split
for while now, thanks to the efforts at IBM where a lab setup has the
most reliable reproducer I've seen on this issue.  This patch has been
tested there successfully.

Signed-off-by: Chris Leech &lt;cleech@redhat.com&gt;
Fixes: 659743b02c41 ("[SCSI] libiscsi: Reduce locking contention in fast path")
Reported-by: Prashantha Subbarao &lt;psubbara@us.ibm.com&gt;
Reviewed-by: Guilherme G. Piccoli &lt;gpiccoli@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: use 'scsi_device_from_queue()' for scsi_dh</title>
<updated>2017-03-12T05:41:45+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2017-02-17T08:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9dc8334d765f7910114921c63a0324272f1f636'/>
<id>e9dc8334d765f7910114921c63a0324272f1f636</id>
<content type='text'>
commit 857de6e00778738dc3d61f75acbac35bdc48e533 upstream.

The device handler needs to check if a given queue belongs to a scsi
device; only then does it make sense to attach a device handler.

[mkp: dropped flags]

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

The device handler needs to check if a given queue belongs to a scsi
device; only then does it make sense to attach a device handler.

[mkp: dropped flags]

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixes</title>
<updated>2016-09-28T05:30:51+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-09-28T05:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=539294b76af8922297702a7ebb8cafe68f7e5376'/>
<id>539294b76af8922297702a7ebb8cafe68f7e5376</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Avoid that toggling use_blk_mq triggers a memory leak</title>
<updated>2016-09-27T00:58:42+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-09-22T21:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d58881b995904bf8b150dae69be0829f832e7be'/>
<id>8d58881b995904bf8b150dae69be0829f832e7be</id>
<content type='text'>
This patch avoids that the following memory leak is triggered if
use_blk_mq is disabled after a SCSI host has been allocated by the
ib_srp driver and before the same SCSI host is freed:

unreferenced object 0xffff8803a168c568 (size 256):
  backtrace:
    [&lt;ffffffff81620c95&gt;] kmemleak_alloc+0x45/0xa0
    [&lt;ffffffff811bb104&gt;] __kmalloc_node+0x1e4/0x400
    [&lt;ffffffff81309fe4&gt;] blk_mq_alloc_tag_set+0xb4/0x230
    [&lt;ffffffff814731b7&gt;] scsi_mq_setup_tags+0xc7/0xd0
    [&lt;ffffffff81469c26&gt;] scsi_add_host_with_dma+0x216/0x2d0
    [&lt;ffffffffa064bef5&gt;] srp_create_target+0xe55/0x13d0 [ib_srp]
    [&lt;ffffffff8143ce23&gt;] dev_attr_store+0x13/0x20
    [&lt;ffffffff8125f030&gt;] sysfs_kf_write+0x40/0x50
    [&lt;ffffffff8125e397&gt;] kernfs_fop_write+0x137/0x1c0
    [&lt;ffffffff811d8c13&gt;] __vfs_write+0x23/0x140
    [&lt;ffffffff811d92e0&gt;] vfs_write+0xb0/0x190
    [&lt;ffffffff811da5b4&gt;] SyS_write+0x44/0xa0
    [&lt;ffffffff8162c8a5&gt;] entry_SYSCALL_64_fastpath+0x18/0xa8

Fixes: 9aa9cc4221f5 ("scsi: remove the disable_blk_mq host flag")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch avoids that the following memory leak is triggered if
use_blk_mq is disabled after a SCSI host has been allocated by the
ib_srp driver and before the same SCSI host is freed:

unreferenced object 0xffff8803a168c568 (size 256):
  backtrace:
    [&lt;ffffffff81620c95&gt;] kmemleak_alloc+0x45/0xa0
    [&lt;ffffffff811bb104&gt;] __kmalloc_node+0x1e4/0x400
    [&lt;ffffffff81309fe4&gt;] blk_mq_alloc_tag_set+0xb4/0x230
    [&lt;ffffffff814731b7&gt;] scsi_mq_setup_tags+0xc7/0xd0
    [&lt;ffffffff81469c26&gt;] scsi_add_host_with_dma+0x216/0x2d0
    [&lt;ffffffffa064bef5&gt;] srp_create_target+0xe55/0x13d0 [ib_srp]
    [&lt;ffffffff8143ce23&gt;] dev_attr_store+0x13/0x20
    [&lt;ffffffff8125f030&gt;] sysfs_kf_write+0x40/0x50
    [&lt;ffffffff8125e397&gt;] kernfs_fop_write+0x137/0x1c0
    [&lt;ffffffff811d8c13&gt;] __vfs_write+0x23/0x140
    [&lt;ffffffff811d92e0&gt;] vfs_write+0xb0/0x190
    [&lt;ffffffff811da5b4&gt;] SyS_write+0x44/0xa0
    [&lt;ffffffff8162c8a5&gt;] entry_SYSCALL_64_fastpath+0x18/0xa8

Fixes: 9aa9cc4221f5 ("scsi: remove the disable_blk_mq host flag")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixes</title>
<updated>2016-08-19T14:41:12+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-08-19T14:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=14a5916e0cce6dbc9acedc99576261c6568689d2'/>
<id>14a5916e0cce6dbc9acedc99576261c6568689d2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: sas: remove is_sas_attached()</title>
<updated>2016-08-19T02:23:20+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-08-17T09:46:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a0f81dbeef13aa0aeaa8b955b38735dbf09de392'/>
<id>a0f81dbeef13aa0aeaa8b955b38735dbf09de392</id>
<content type='text'>
As there are no more users of is_sas_attached() left, remove it.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As there are no more users of is_sas_attached() left, remove it.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: sas: provide stub implementation for scsi_is_sas_rphy</title>
<updated>2016-08-19T02:21:41+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-08-17T09:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c1a23f6d64552b4480208aa584ec7e9c13d6d9c3'/>
<id>c1a23f6d64552b4480208aa584ec7e9c13d6d9c3</id>
<content type='text'>
Provide a stub implementation for scsi_is_sas_rphy for kernel
configurations which do not have CONFIG_SCSI_SAS_ATTRS defined.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Suggested-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Reviewed-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a stub implementation for scsi_is_sas_rphy for kernel
configurations which do not have CONFIG_SCSI_SAS_ATTRS defined.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Suggested-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Reviewed-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2016-08-05T00:04:37+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-08-05T00:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fdf1f7ff1bd7f1c6d1d5dc2b29b6b11a4f722276'/>
<id>fdf1f7ff1bd7f1c6d1d5dc2b29b6b11a4f722276</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "The most notable item is IBM virtual SCSI target driver, that was
  originally ported to target-core back in 2010 by Tomo-san, and has
  been brought forward to v4.x code by Bryant Ly, Michael Cyr and co
  over the last months.

  Also included are two ORDERED task related bug-fixes Bryant + Michael
  found along the way using ibmvscsis with AIX guests, plus a few
  miscellaneous target-core + iscsi-target bug-fixes with associated
  stable tags"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: fix spelling mistake: "limitiation" -&gt; "limitation"
  target: Fix residual overflow handling in target_complete_cmd_with_length
  tcm_fc: set and unset FCP_SPPF_TARG_FCN
  iscsi-target: Fix panic when adding second TCP connection to iSCSI session
  ibmvscsis: Initial commit of IBM VSCSI Tgt Driver
  target: Fix ordered task CHECK_CONDITION early exception handling
  target: Fix ordered task target_setup_cmd_from_cdb exception hang
  target: Fix max_unmap_lba_count calc overflow
  target: Fix race between iscsi-target connection shutdown + ABORT_TASK
  target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull SCSI target updates from Nicholas Bellinger:
 "The most notable item is IBM virtual SCSI target driver, that was
  originally ported to target-core back in 2010 by Tomo-san, and has
  been brought forward to v4.x code by Bryant Ly, Michael Cyr and co
  over the last months.

  Also included are two ORDERED task related bug-fixes Bryant + Michael
  found along the way using ibmvscsis with AIX guests, plus a few
  miscellaneous target-core + iscsi-target bug-fixes with associated
  stable tags"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: fix spelling mistake: "limitiation" -&gt; "limitation"
  target: Fix residual overflow handling in target_complete_cmd_with_length
  tcm_fc: set and unset FCP_SPPF_TARG_FCN
  iscsi-target: Fix panic when adding second TCP connection to iSCSI session
  ibmvscsis: Initial commit of IBM VSCSI Tgt Driver
  target: Fix ordered task CHECK_CONDITION early exception handling
  target: Fix ordered task target_setup_cmd_from_cdb exception hang
  target: Fix max_unmap_lba_count calc overflow
  target: Fix race between iscsi-target connection shutdown + ABORT_TASK
  target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
</pre>
</div>
</content>
</entry>
<entry>
<title>fcoe: implement FIP VLAN responder</title>
<updated>2016-07-20T23:49:41+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-07-19T11:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a6cf881df0293cc1c06d31bcbeda6c23b95dcac'/>
<id>9a6cf881df0293cc1c06d31bcbeda6c23b95dcac</id>
<content type='text'>
When running in VN2VN mode there is no central instance which would send
out any FIP VLAN discovery notifications. So this patch adds a new sysfs
attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery
responder.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Acked-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running in VN2VN mode there is no central instance which would send
out any FIP VLAN discovery notifications. So this patch adds a new sysfs
attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery
responder.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Acked-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ibmvscsis: Initial commit of IBM VSCSI Tgt Driver</title>
<updated>2016-07-20T08:15:43+00:00</updated>
<author>
<name>Bryant G. Ly</name>
<email>bryantly@linux.vnet.ibm.com</email>
</author>
<published>2016-06-28T22:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88a678bbc34cecce36bf2c7a8af4cba38f9f77ce'/>
<id>88a678bbc34cecce36bf2c7a8af4cba38f9f77ce</id>
<content type='text'>
This driver is a pick up of the old IBM VIO scsi Target Driver
that was started by Nick and Fujita 2-4 years ago.
http://comments.gmane.org/gmane.linux.scsi/90119

The driver provides a virtual SCSI device on IBM Power Servers.

This patch contains the fifth version for an initial merge of the
tcm ibmvscsis driver. More information on this driver and config
can be found:

https://github.com/powervm/ibmvscsis/wiki/Configuration
http://www.linux-iscsi.org/wiki/IBM_vSCSI

(Drop extra libsrp review breakage + Fix kconfig typo - nab)

Signed-off-by: Steven Royer &lt;seroyer@linux.vnet.ibm.com&gt;
Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Signed-off-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Cc: FUJITA Tomonori &lt;tomof@acm.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver is a pick up of the old IBM VIO scsi Target Driver
that was started by Nick and Fujita 2-4 years ago.
http://comments.gmane.org/gmane.linux.scsi/90119

The driver provides a virtual SCSI device on IBM Power Servers.

This patch contains the fifth version for an initial merge of the
tcm ibmvscsis driver. More information on this driver and config
can be found:

https://github.com/powervm/ibmvscsis/wiki/Configuration
http://www.linux-iscsi.org/wiki/IBM_vSCSI

(Drop extra libsrp review breakage + Fix kconfig typo - nab)

Signed-off-by: Steven Royer &lt;seroyer@linux.vnet.ibm.com&gt;
Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Signed-off-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Cc: FUJITA Tomonori &lt;tomof@acm.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
