<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/target/target_core_pr.c, branch v6.1.174</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.174</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.174'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-28T14:26:02+00:00</updated>
<entry>
<title>scsi: target: core: Generate correct identifiers for PR OUT transport IDs</title>
<updated>2025-08-28T14:26:02+00:00</updated>
<author>
<name>Maurizio Lombardi</name>
<email>mlombard@redhat.com</email>
</author>
<published>2025-07-14T13:37:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=128107627a77ba76bb44aa28de952ec5215439dd'/>
<id>urn:sha1:128107627a77ba76bb44aa28de952ec5215439dd</id>
<content type='text'>
[ Upstream commit 6e0f6aa44b68335df404a2df955055f416b5f2aa ]

Fix target_parse_pr_out_transport_id() to return a string representing
the transport ID in a human-readable format (e.g., naa.xxxxxxxx...)  for
various SCSI protocol types (SAS, FCP, SRP, SBP).

Previously, the function returned a pointer to the raw binary buffer,
which was incorrectly compared against human-readable strings, causing
comparisons to fail.  Now, the function writes a properly formatted
string into a buffer provided by the caller.  The output format depends
on the transport protocol:

* SAS: 64-bit identifier, "naa." prefix.
* FCP: 64-bit identifier, colon separated values.
* SBP: 64-bit identifier, no prefix.
* SRP: 128-bit identifier, "0x" prefix.
* iSCSI: IQN string.

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Link: https://lore.kernel.org/r/20250714133738.11054-1-mlombard@redhat.com
Reviewed-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.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: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()</title>
<updated>2025-07-10T13:59:50+00:00</updated>
<author>
<name>Maurizio Lombardi</name>
<email>mlombard@redhat.com</email>
</author>
<published>2025-06-12T10:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1627dda4d70ceb1ba62af2e401af73c09abb1eb5'/>
<id>urn:sha1:1627dda4d70ceb1ba62af2e401af73c09abb1eb5</id>
<content type='text'>
[ Upstream commit d8ab68bdb294b09a761e967dad374f2965e1913f ]

The function core_scsi3_decode_spec_i_port(), in its error code path,
unconditionally calls core_scsi3_lunacl_undepend_item() passing the
dest_se_deve pointer, which may be NULL.

This can lead to a NULL pointer dereference if dest_se_deve remains
unset.

SPC-3 PR SPEC_I_PT: Unable to locate dest_tpg
Unable to handle kernel paging request at virtual address dfff800000000012
Call trace:
  core_scsi3_lunacl_undepend_item+0x2c/0xf0 [target_core_mod] (P)
  core_scsi3_decode_spec_i_port+0x120c/0x1c30 [target_core_mod]
  core_scsi3_emulate_pro_register+0x6b8/0xcd8 [target_core_mod]
  target_scsi3_emulate_pr_out+0x56c/0x840 [target_core_mod]

Fix this by adding a NULL check before calling
core_scsi3_lunacl_undepend_item()

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Link: https://lore.kernel.org/r/20250612101556.24829-1-mlombard@redhat.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Reviewed-by: John Meneghini &lt;jmeneghi@redhat.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: core: New key must be used for moved PR</title>
<updated>2022-10-01T09:03:57+00:00</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2022-09-09T09:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e2deba7aa662862c8046aa24148b83b49298a9b'/>
<id>urn:sha1:3e2deba7aa662862c8046aa24148b83b49298a9b</id>
<content type='text'>
According to SPC4 5.12.8:

  e) Retain the reservation key specified in the SERVICE ACTION RESERVATION
  KEY field and associated information;

But currently sa_res_key is only used for the not existing I_T nexus. Add a
changing of the key for the existing I_T nexus the PR moved to.

Link: https://lore.kernel.org/r/20220909090425.14479-5-d.bogdanov@yadro.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: core: Abort all preempted regs if requested</title>
<updated>2022-10-01T09:03:57+00:00</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2022-09-09T09:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49790e6a582012c36ca17174cda228444f9a2414'/>
<id>urn:sha1:49790e6a582012c36ca17174cda228444f9a2414</id>
<content type='text'>
According to SPC the preempted commands shall be always aborted.

SPC-4: 5.12.11.2.6 Preempting and aborting

  c) all commands from the I_T nexus(es) associated with the persistent
  reservations or registrations being preempted (i.e., preempted commands)
  except the PERSISTENT RESERVE OUT command itself shall be aborted as
  defined in SAM-5;

Link: https://lore.kernel.org/r/20220909090425.14479-4-d.bogdanov@yadro.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: core: Fix memory leak in preempt_and_abort</title>
<updated>2022-10-01T09:03:57+00:00</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2022-09-09T09:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f050a7c66ca56aa2f49ab9b53e01d04b3e7e94c5'/>
<id>urn:sha1:f050a7c66ca56aa2f49ab9b53e01d04b3e7e94c5</id>
<content type='text'>
Always release preempt_and_abort_list to avoid memory leak of
t10_pr_registration objects in it.

Link: https://lore.kernel.org/r/20220909090425.14479-3-d.bogdanov@yadro.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: core: Fix preempt and abort for allreg res</title>
<updated>2022-10-01T09:03:56+00:00</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2022-09-09T09:04:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1f1009ea8ca5a0271ad69afe8a86c887d530b5c8'/>
<id>urn:sha1:1f1009ea8ca5a0271ad69afe8a86c887d530b5c8</id>
<content type='text'>
Match a key only if SARK is not zero according to SPC-4 and the comment
above the code:

 If an all registrants persistent reservation is present and the SERVICE
 ACTION RESERVATION KEY field is set to zero, then all registrations
 shall be removed except for that of the I_T nexus that is being used
 for the PERSISTENT RESERVE OUT command;

Without this patch in case of SARK==0 no registrants will be removed.

Link: https://lore.kernel.org/r/20220909090425.14479-2-d.bogdanov@yadro.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: core: De-RCU of se_lun and se_lun acl</title>
<updated>2022-08-01T23:36:02+00:00</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2022-07-27T21:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef4f7e4bf1dc26aaa86cf8e5a13013684139be51'/>
<id>urn:sha1:ef4f7e4bf1dc26aaa86cf8e5a13013684139be51</id>
<content type='text'>
se_lun and se_lun_acl are immutable pointers of struct se_dev_entry.
Remove RCU usage for access to those pointers.

Link: https://lore.kernel.org/r/20220727214125.19647-3-d.bogdanov@yadro.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Fix spelling mistake "CONFLIFT" -&gt; "CONFLICT"</title>
<updated>2021-09-22T04:17:29+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-09-20T18:32:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a8ef2c73c727a3c64b70c01697c578c7b10fed2'/>
<id>urn:sha1:9a8ef2c73c727a3c64b70c01697c578c7b10fed2</id>
<content type='text'>
There is a spelling mistake in a dev_err message. Fix it.

Link: https://lore.kernel.org/r/20210920183206.17477-1-colin.king@canonical.com
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Use standard SAM status types</title>
<updated>2021-06-01T02:48:24+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2021-04-27T08:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14b40c1e7ccc07e486719362f6f29ec5e3151331'/>
<id>urn:sha1:14b40c1e7ccc07e486719362f6f29ec5e3151331</id>
<content type='text'>
target_complete_cmd() and friends requires a SAM status type, so passing
GOOD here is actually wrong.

Link: https://lore.kernel.org/r/20210427083046.31620-40-hare@suse.de
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Fix two format specifiers</title>
<updated>2021-04-16T02:44:41+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-04-15T22:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e15c745295a22470b663b101f5130d29e16fbde3'/>
<id>urn:sha1:e15c745295a22470b663b101f5130d29e16fbde3</id>
<content type='text'>
Use format specifier '%u' to format the u32 data type instead of '%hu'.

Link: https://lore.kernel.org/r/20210415220826.29438-19-bvanassche@acm.org
Cc: Mike Christie &lt;michael.christie@oracle.com&gt;
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
