<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/target/target_core_base.h, branch v4.5</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.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-02-11T07:08:55Z</updated>
<entry>
<title>target/transport: add flag to indicate CPU Affinity is observed</title>
<updated>2016-02-11T07:08:55Z</updated>
<author>
<name>Quinn Tran</name>
<email>quinn.tran@qlogic.com</email>
</author>
<published>2016-02-10T23:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9095adaab8c1d82707e4e9961b6ad79b62f3361b'/>
<id>urn:sha1:9095adaab8c1d82707e4e9961b6ad79b62f3361b</id>
<content type='text'>
Signed-off-by: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Fixes: fb3269b ("qla2xxx: Add selective command queuing")
Signed-off-by: Himanshu Madhani &lt;himanshu.madhani@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop legacy se_cmd-&gt;task_stop_comp + REQUEST_STOP usage</title>
<updated>2016-02-06T23:59:56Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-29T08:07:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57dae19065bde296dfdf08b8e46c102a671ff741'/>
<id>urn:sha1:57dae19065bde296dfdf08b8e46c102a671ff741</id>
<content type='text'>
With CMD_T_FABRIC_STOP + se_cmd-&gt;cmd_wait_set usage in place,
go ahead and drop left-over CMD_T_REQUEST_STOP checks in
target_complete_cmd() and unused target_stop_cmd().

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Himanshu Madhani &lt;himanshu.madhani@qlogic.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Mike Christie &lt;mchristi@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix remote-port TMR ABORT + se_cmd fabric stop</title>
<updated>2016-02-05T23:40:34Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-19T23:23:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f4a943168f31d29a1701908931acaba518b131a'/>
<id>urn:sha1:0f4a943168f31d29a1701908931acaba518b131a</id>
<content type='text'>
To address the bug where fabric driver level shutdown
of se_cmd occurs at the same time when TMR CMD_T_ABORTED
is happening resulting in a -1 -&gt;cmd_kref, this patch
adds a CMD_T_FABRIC_STOP bit that is used to determine
when TMR + driver I_T nexus shutdown is happening
concurrently.

It changes target_sess_cmd_list_set_waiting() to obtain
se_cmd-&gt;cmd_kref + set CMD_T_FABRIC_STOP, and drop local
reference in target_wait_for_sess_cmds() and invoke extra
target_put_sess_cmd() during Task Aborted Status (TAS)
when necessary.

Also, it adds a new target_wait_free_cmd() wrapper around
transport_wait_for_tasks() for the special case within
transport_generic_free_cmd() to set CMD_T_FABRIC_STOP,
and is now aware of CMD_T_ABORTED + CMD_T_TAS status
bits to know when an extra transport_put_cmd() during
TAS is required.

Note transport_generic_free_cmd() is expected to block on
cmd-&gt;cmd_wait_comp in order to follow what iscsi-target
expects during iscsi_conn context se_cmd shutdown.

Cc: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Himanshu Madhani &lt;himanshu.madhani@qlogic.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Mike Christie &lt;mchristi@redhat.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@daterainc.com&gt;
</content>
</entry>
<entry>
<title>target: Fix LUN_RESET active I/O handling for ACK_KREF</title>
<updated>2016-02-03T22:09:07Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-12T05:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=febe562c20dfa8f33bee7d419c6b517986a5aa33'/>
<id>urn:sha1:febe562c20dfa8f33bee7d419c6b517986a5aa33</id>
<content type='text'>
This patch fixes a NULL pointer se_cmd-&gt;cmd_kref &lt; 0
refcount bug during TMR LUN_RESET with active se_cmd
I/O, that can be triggered during se_cmd descriptor
shutdown + release via core_tmr_drain_state_list() code.

To address this bug, add common __target_check_io_state()
helper for ABORT_TASK + LUN_RESET w/ CMD_T_COMPLETE
checking, and set CMD_T_ABORTED + obtain -&gt;cmd_kref for
both cases ahead of last target_put_sess_cmd() after
TFO-&gt;aborted_task() -&gt; transport_cmd_finish_abort()
callback has completed.

It also introduces SCF_ACK_KREF to determine when
transport_cmd_finish_abort() needs to drop the second
extra reference, ahead of calling target_put_sess_cmd()
for the final kref_put(&amp;se_cmd-&gt;cmd_kref).

It also updates transport_cmd_check_stop() to avoid
holding se_cmd-&gt;t_state_lock while dropping se_cmd
device state via target_remove_from_state_list(), now
that core_tmr_drain_state_list() is holding the
se_device lock while checking se_cmd state from
within TMR logic.

Finally, move transport_put_cmd() release of SGL +
TMR + extended CDB memory into target_free_cmd_mem()
in order to avoid potential resource leaks in TMR
ABORT_TASK + LUN_RESET code-paths.  Also update
target_release_cmd_kref() accordingly.

Reviewed-by: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Himanshu Madhani &lt;himanshu.madhani@qlogic.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Mike Christie &lt;mchristi@redhat.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2016-01-21T01:20:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-21T01:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71e4634e00119b2fb8dd0da99b3f5ebbb49cc872'/>
<id>urn:sha1:71e4634e00119b2fb8dd0da99b3f5ebbb49cc872</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "The highlights this round include:

   - Introduce configfs support for unlocked configfs_depend_item()
     (krzysztof + andrezej)
   - Conversion of usb-gadget target driver to new function registration
     interface (andrzej + sebastian)
   - Enable qla2xxx FC target mode support for Extended Logins (himansu +
     giridhar)
   - Enable qla2xxx FC target mode support for Exchange Offload (himansu +
     giridhar)
   - Add qla2xxx FC target mode irq affinity notification + selective
     command queuing.  (quinn + himanshu)
   - Fix iscsi-target deadlock in se_node_acl configfs deletion (sagi +
     nab)
   - Convert se_node_acl configfs deletion + se_node_acl-&gt;queue_depth to
     proper se_session-&gt;sess_kref + target_get_session() usage.  (hch +
     sagi + nab)
   - Fix long-standing race between se_node_acl-&gt;acl_kref get and
     get_initiator_node_acl() lookup.  (hch + nab)
   - Fix target/user block-size handling, and make sure netlink reaches
     all network namespaces (sheng + andy)

  Note there is an outstanding bug-fix series for remote I_T nexus port
  TMR LUN_RESET has been posted and still being tested, and will likely
  become post -rc1 material at this point"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (56 commits)
  scsi: qla2xxxx: avoid type mismatch in comparison
  target/user: Make sure netlink would reach all network namespaces
  target: Obtain se_node_acl-&gt;acl_kref during get_initiator_node_acl
  target: Convert ACL change queue_depth se_session reference usage
  iscsi-target: Fix potential dead-lock during node acl delete
  ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage
  tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage
  tcm_fc: Wait for command completion before freeing a session
  target: Fix a memory leak in target_dev_lba_map_store()
  target: Support aborting tasks with a 64-bit tag
  usb/gadget: Remove set-but-not-used variables
  target: Remove an unused variable
  target: Fix indentation in target_core_configfs.c
  target/user: Allow user to set block size before enabling device
  iser-target: Fix non negative ERR_PTR isert_device_get usage
  target/fcoe: Add tag support to tcm_fc
  qla2xxx: Check for online flag instead of active reset when transmitting responses
  qla2xxx: Set all queues to 4k
  qla2xxx: Disable ZIO at start time.
  qla2xxx: Move atioq to a different lock to reduce lock contention
  ...
</content>
</entry>
<entry>
<title>target: Remove an unused variable</title>
<updated>2016-01-07T21:57:53Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-01-05T13:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dba5ccc7a67713fccb7726057d8df826672a7257'/>
<id>urn:sha1:dba5ccc7a67713fccb7726057d8df826672a7257</id>
<content type='text'>
The num_node_acls member in struct se_portal_group is modified
by several functions but is never read. Hence remove it.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>qla2xxx: Add selective command queuing</title>
<updated>2016-01-07T21:57:47Z</updated>
<author>
<name>Quinn Tran</name>
<email>quinn.tran@qlogic.com</email>
</author>
<published>2015-12-17T19:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb3269baf4ecc2ce6d17d4eb537080035bdf6d5b'/>
<id>urn:sha1:fb3269baf4ecc2ce6d17d4eb537080035bdf6d5b</id>
<content type='text'>
queue work element to specific process lessen cache miss

Signed-off-by: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Signed-off-by: Himanshu Madhani &lt;himanshu.madhani@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/sbc: Add LBPRZ attribute + control CDB emulation</title>
<updated>2016-01-06T21:39:55Z</updated>
<author>
<name>Jamie Pocas</name>
<email>jamie.pocas@emc.com</email>
</author>
<published>2015-11-29T22:44:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6f41633cb79b55ead84b023c02035322c7827e7'/>
<id>urn:sha1:e6f41633cb79b55ead84b023c02035322c7827e7</id>
<content type='text'>
This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16)
based on a new unmap_zeroes_data device attribute. This flag is set
automatically for iblock based on underlying block device queue's
discard_zeroes_data flag.

Signed-off-by: Jamie Pocas &lt;jamie.pocas@emc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix race for SCF_COMPARE_AND_WRITE_POST checking</title>
<updated>2015-11-29T03:33:15Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2015-11-06T07:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=057085e522f8bf94c2e691a5b76880f68060f8ba'/>
<id>urn:sha1:057085e522f8bf94c2e691a5b76880f68060f8ba</id>
<content type='text'>
This patch addresses a race + use after free where the first
stage of COMPARE_AND_WRITE in compare_and_write_callback()
is rescheduled after the backend sends the secondary WRITE,
resulting in second stage compare_and_write_post() callback
completing in target_complete_ok_work() before the first
can return.

Because current code depends on checking se_cmd-&gt;se_cmd_flags
after return from se_cmd-&gt;transport_complete_callback(),
this results in first stage having SCF_COMPARE_AND_WRITE_POST
set, which incorrectly falls through into second stage CAW
processing code, eventually triggering a NULL pointer
dereference due to use after free.

To address this bug, pass in a new *post_ret parameter into
se_cmd-&gt;transport_complete_callback(), and depend upon this
value instead of -&gt;se_cmd_flags to determine when to return
or fall through into -&gt;queue_status() code for CAW.

Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.12+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2015-11-14T04:04:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-14T04:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9aa3d651a9199103eb6451aeb0ac1b66a6d770a6'/>
<id>urn:sha1:9aa3d651a9199103eb6451aeb0ac1b66a6d770a6</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "This series contains HCH's changes to absorb configfs attribute
  -&gt;show() + -&gt;store() function pointer usage from it's original
  tree-wide consumers, into common configfs code.

  It includes usb-gadget, target w/ drivers, netconsole and ocfs2
  changes to realize the improved simplicity, that now renders the
  original include/target/configfs_macros.h CPP magic for fabric drivers
  and others, unnecessary and obsolete.

  And with common code in place, new configfs attributes can be added
  easier than ever before.

  Note, there are further improvements in-flight from other folks for
  v4.5 code in configfs land, plus number of target fixes for post -rc1
  code"

In the meantime, a new user of the now-removed old configfs API came in
through the char/misc tree in commit 7bd1d4093c2f ("stm class: Introduce
an abstraction for System Trace Module devices").

This merge resolution comes from Alexander Shishkin, who updated his stm
class tracing abstraction to account for the removal of the old
show_attribute and store_attribute methods in commit 517982229f78
("configfs: remove old API") from this pull.  As Alexander says about
that patch:

 "There's no need to keep an extra wrapper structure per item and the
  awkward show_attribute/store_attribute item ops are no longer needed.

  This patch converts policy code to the new api, all the while making
  the code quite a bit smaller and easier on the eyes.

  Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;"

That patch was folded into the merge so that the tree should be fully
bisectable.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (23 commits)
  configfs: remove old API
  ocfs2/cluster: use per-attribute show and store methods
  ocfs2/cluster: move locking into attribute store methods
  netconsole: use per-attribute show and store methods
  target: use per-attribute show and store methods
  spear13xx_pcie_gadget: use per-attribute show and store methods
  dlm: use per-attribute show and store methods
  usb-gadget/f_serial: use per-attribute show and store methods
  usb-gadget/f_phonet: use per-attribute show and store methods
  usb-gadget/f_obex: use per-attribute show and store methods
  usb-gadget/f_uac2: use per-attribute show and store methods
  usb-gadget/f_uac1: use per-attribute show and store methods
  usb-gadget/f_mass_storage: use per-attribute show and store methods
  usb-gadget/f_sourcesink: use per-attribute show and store methods
  usb-gadget/f_printer: use per-attribute show and store methods
  usb-gadget/f_midi: use per-attribute show and store methods
  usb-gadget/f_loopback: use per-attribute show and store methods
  usb-gadget/ether: use per-attribute show and store methods
  usb-gadget/f_acm: use per-attribute show and store methods
  usb-gadget/f_hid: use per-attribute show and store methods
  ...
</content>
</entry>
</feed>
