<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/target/target_core_xcopy.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-09-03T09:29:18Z</updated>
<entry>
<title>scsi: target: Fix xcopy sess release leak</title>
<updated>2020-09-03T09:29:18Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2020-07-02T01:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cca4669a976868962fb8ae096c35633810bab328'/>
<id>urn:sha1:cca4669a976868962fb8ae096c35633810bab328</id>
<content type='text'>
[ Upstream commit 3c006c7d23aac928279f7cbe83bbac4361255d53 ]

transport_init_session can allocate memory via percpu_ref_init, and
target_xcopy_release_pt never frees it. This adds a
transport_uninit_session function to handle cleanup of resources allocated
in the init function.

Link: https://lore.kernel.org/r/1593654203-12442-3-git-send-email-michael.christie@oracle.com
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb()</title>
<updated>2020-06-10T01:57:26Z</updated>
<author>
<name>Sudhakar Panneerselvam</name>
</author>
<published>2020-06-07T19:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=987db58737e26c3d995811fefef9632756ca7cec'/>
<id>urn:sha1:987db58737e26c3d995811fefef9632756ca7cec</id>
<content type='text'>
This commit also removes the unused argument, cdb, that was passed to this
function.

Link: https://lore.kernel.org/r/1591559913-8388-5-git-send-email-sudhakar.panneerselvam@oracle.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Sudhakar Panneerselvam &lt;sudhakar.panneerselvam@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Fix NULL pointer dereference</title>
<updated>2020-06-10T01:57:26Z</updated>
<author>
<name>Sudhakar Panneerselvam</name>
</author>
<published>2020-06-07T19:58:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e95fb805dc043cc8ed878a08d1583e4097a5f80'/>
<id>urn:sha1:9e95fb805dc043cc8ed878a08d1583e4097a5f80</id>
<content type='text'>
NULL pointer dereference happens when the following conditions are met:

1) A SCSI command is received for a non-existing LU or cdb initialization
   fails in target_setup_cmd_from_cdb().

2) Tracing is enabled.

The following call sequences lead to NULL pointer dereference:

1) iscsit_setup_scsi_cmd
     transport_lookup_cmd_lun &lt;-- lookup fails.
          or
     target_setup_cmd_from_cdb() &lt;-- cdb initialization fails
   iscsit_process_scsi_cmd
     iscsit_sequence_cmd
       transport_send_check_condition_and_sense
         trace_target_cmd_complete &lt;-- NULL dereference

2) target_submit_cmd_map_sgls
     transport_lookup_cmd_lun &lt;-- lookup fails
          or
     target_setup_cmd_from_cdb() &lt;-- cdb initialization fails
       transport_send_check_condition_and_sense
         trace_target_cmd_complete &lt;-- NULL dereference

In the above sequence, cmd-&gt;t_task_cdb is uninitialized which when
referenced in trace_target_cmd_complete() causes NULL pointer dereference.

The fix is to use the helper, target_cmd_init_cdb() and call it after
transport_init_se_cmd() is called, so that cmd-&gt;t_task_cdb can be
initialized and hence can be referenced in trace_target_cmd_complete().

Link: https://lore.kernel.org/r/1591559913-8388-4-git-send-email-sudhakar.panneerselvam@oracle.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Sudhakar Panneerselvam &lt;sudhakar.panneerselvam@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Initialize LUN in transport_init_se_cmd()</title>
<updated>2020-06-10T01:57:26Z</updated>
<author>
<name>Sudhakar Panneerselvam</name>
</author>
<published>2020-06-07T19:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a36840d8002736060f96386cf5dd148f0b0d4fa3'/>
<id>urn:sha1:a36840d8002736060f96386cf5dd148f0b0d4fa3</id>
<content type='text'>
Initialization of orig_fe_lun is moved to transport_init_se_cmd() from
transport_lookup_cmd_lun(). This helps for the cases where the SCSI request
fails before the call to transport_lookup_cmd_lun() so that
trace_target_cmd_complete() can print the LUN information to the trace
buffer. Due to this change, the lun parameter is removed from
transport_lookup_cmd_lun() and transport_lookup_tmr_lun().

Link: https://lore.kernel.org/r/1591559913-8388-3-git-send-email-sudhakar.panneerselvam@oracle.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Sudhakar Panneerselvam &lt;sudhakar.panneerselvam@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: use the stack for XCOPY passthrough cmds</title>
<updated>2020-03-29T22:10:59Z</updated>
<author>
<name>David Disseldorp</name>
</author>
<published>2020-03-27T14:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b92fcfcb687de7d08278a557faff3a7b4a672cc7'/>
<id>urn:sha1:b92fcfcb687de7d08278a557faff3a7b4a672cc7</id>
<content type='text'>
Reads and writes in the XCOPY loop are synchronous, so needn't be heap
allocated / freed with each loop.

Link: https://lore.kernel.org/r/20200327141954.955-6-ddiss@suse.de
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: avoid per-loop XCOPY buffer allocations</title>
<updated>2020-03-29T22:10:59Z</updated>
<author>
<name>David Disseldorp</name>
</author>
<published>2020-03-27T14:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ad08996da05b6b735d4963dceab7d2a4043607c'/>
<id>urn:sha1:0ad08996da05b6b735d4963dceab7d2a4043607c</id>
<content type='text'>
The main target_xcopy_do_work() loop unnecessarily allocates an I/O buffer
with each synchronous READ / WRITE pair. This commit significantly reduces
allocations by reusing the XCOPY I/O buffer when possible.

Link: https://lore.kernel.org/r/20200327141954.955-4-ddiss@suse.de
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: drop xcopy DISK BLOCK LENGTH debug</title>
<updated>2020-03-29T22:10:59Z</updated>
<author>
<name>David Disseldorp</name>
</author>
<published>2020-03-27T14:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=267fc83f8836ad6168ed264a0823543439abb3be'/>
<id>urn:sha1:267fc83f8836ad6168ed264a0823543439abb3be</id>
<content type='text'>
The DISK BLOCK LENGTH field is carried with XCOPY target descriptors on the
wire, but is currently unmarshalled during 0x02 segment descriptor
passing. The unmarshalled value is currently unused, so drop it.

Link: https://lore.kernel.org/r/20200327141954.955-3-ddiss@suse.de
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: use #define for xcopy descriptor len</title>
<updated>2020-03-29T22:10:59Z</updated>
<author>
<name>David Disseldorp</name>
</author>
<published>2020-03-27T14:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95b1b51e776d89882ee67077976784b8812fbf9f'/>
<id>urn:sha1:95b1b51e776d89882ee67077976784b8812fbf9f</id>
<content type='text'>
Link: https://lore.kernel.org/r/20200327141954.955-2-ddiss@suse.de
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Remove tpg_list and se_portal_group.se_tpg_node</title>
<updated>2019-10-04T02:00:09Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2019-09-30T23:22:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27f722ccbe1563629275bb7ee30c0e307f5837a2'/>
<id>urn:sha1:27f722ccbe1563629275bb7ee30c0e307f5837a2</id>
<content type='text'>
Maintaining tpg_list without ever iterating over it is not useful. Hence
remove tpg_list. This patch does not change the behavior of the SCSI target
code.

Cc: Mike Christie &lt;mchristie@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Link: https://lore.kernel.org/r/20190930232224.58980-1-bvanassche@acm.org
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;mchristi@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157</title>
<updated>2019-05-30T18:26:37Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-27T06:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c942fddf8793b2013be8c901b47d0a8dc02bf99f'/>
<id>urn:sha1:c942fddf8793b2013be8c901b47d0a8dc02bf99f</id>
<content type='text'>
Based on 3 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [kishon] [vijay] [abraham]
  [i] [kishon]@[ti] [com] this program is distributed in the hope that
  it will be useful but without any warranty without even the implied
  warranty of merchantability or fitness for a particular purpose see
  the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [graeme] [gregory]
  [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
  [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
  [hk] [hemahk]@[ti] [com] this program is distributed in the hope
  that it will be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
