<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/lpfc, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-12-03T11:45:12Z</updated>
<entry>
<title>scsi: lpfc: Define size of debugfs entry for xri rebalancing</title>
<updated>2025-12-03T11:45:12Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2025-09-15T18:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=166972f62a2107c4fde1e5c7dc2f96b22bed1d80'/>
<id>urn:sha1:166972f62a2107c4fde1e5c7dc2f96b22bed1d80</id>
<content type='text'>
[ Upstream commit 5de09770b1c0e229d2cec93e7f634fcdc87c9bc8 ]

To assist in debugging lpfc_xri_rebalancing driver parameter, a debugfs
entry is used.  The debugfs file operations for xri rebalancing have
been previously implemented, but lack definition for its information
buffer size.  Similar to other pre-existing debugfs entry buffers,
define LPFC_HDWQINFO_SIZE as 8192 bytes.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Message-ID: &lt;20250915180811.137530-9-justintee8345@gmail.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: lpfc: Check return status of lpfc_reset_flush_io_context during TGT_RESET</title>
<updated>2025-12-03T11:45:12Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2025-09-15T18:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e50586bbdac5eaf8a8699dd2d056c02c2df32e31'/>
<id>urn:sha1:e50586bbdac5eaf8a8699dd2d056c02c2df32e31</id>
<content type='text'>
[ Upstream commit f408dde2468b3957e92b25e7438f74c8e9fb9e73 ]

If lpfc_reset_flush_io_context fails to execute, then the wrong return
status code may be passed back to upper layers when issuing a target
reset TMF command.  Fix by checking the return status from
lpfc_reset_flush_io_context() first in order to properly return FAILED
or FAST_IO_FAIL.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Message-ID: &lt;20250915180811.137530-7-justintee8345@gmail.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: lpfc: Fix buffer free/clear order in deferred receive path</title>
<updated>2025-09-09T16:43:59Z</updated>
<author>
<name>John Evans</name>
</author>
<published>2025-09-07T03:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab34084f42ee06a9028d67c78feafb911d33d111'/>
<id>urn:sha1:ab34084f42ee06a9028d67c78feafb911d33d111</id>
<content type='text'>
[ Upstream commit 9dba9a45c348e8460da97c450cddf70b2056deb3 ]

Fix a use-after-free window by correcting the buffer release sequence in
the deferred receive path. The code freed the RQ buffer first and only
then cleared the context pointer under the lock. Concurrent paths (e.g.,
ABTS and the repost path) also inspect and release the same pointer under
the lock, so the old order could lead to double-free/UAF.

Note that the repost path already uses the correct pattern: detach the
pointer under the lock, then free it after dropping the lock. The
deferred path should do the same.

Fixes: 472e146d1cf3 ("scsi: lpfc: Correct upcalling nvmet_fc transport during io done downcall")
Cc: stable@vger.kernel.org
Signed-off-by: John Evans &lt;evans1210144@gmail.com&gt;
Link: https://lore.kernel.org/r/20250828044008.743-1-evans1210144@gmail.com
Reviewed-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
[ Adjust context ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: lpfc: Remove redundant assignment to avoid memory leak</title>
<updated>2025-08-28T14:21:30Z</updated>
<author>
<name>Jiasheng Jiang</name>
</author>
<published>2025-08-01T18:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=896cbd432ede14b2e8119038c599c6c7ce2fd2f7'/>
<id>urn:sha1:896cbd432ede14b2e8119038c599c6c7ce2fd2f7</id>
<content type='text'>
[ Upstream commit eea6cafb5890db488fce1c69d05464214616d800 ]

Remove the redundant assignment if kzalloc() succeeds to avoid memory
leak.

Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support")
Signed-off-by: Jiasheng Jiang &lt;jiashengjiangcool@gmail.com&gt;
Link: https://lore.kernel.org/r/20250801185202.42631-1-jiashengjiangcool@gmail.com
Reviewed-by: Justin Tee &lt;justin.tee@broadcom.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: lpfc: Check for hdwq null ptr when cleaning up lpfc_vport structure</title>
<updated>2025-08-28T14:21:28Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2025-06-18T19:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6711ce7e9de4eb1a541ef30638df1294ea4267f8'/>
<id>urn:sha1:6711ce7e9de4eb1a541ef30638df1294ea4267f8</id>
<content type='text'>
[ Upstream commit 6698796282e828733cde3329c887b4ae9e5545e9 ]

If a call to lpfc_sli4_read_rev() from lpfc_sli4_hba_setup() fails, the
resultant cleanup routine lpfc_sli4_vport_delete_fcp_xri_aborted() may
occur before sli4_hba.hdwqs are allocated.  This may result in a null
pointer dereference when attempting to take the abts_io_buf_list_lock for
the first hardware queue.  Fix by adding a null ptr check on
phba-&gt;sli4_hba.hdwq and early return because this situation means there
must have been an error during port initialization.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Link: https://lore.kernel.org/r/20250618192138.124116-4-justintee8345@gmail.com
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: lpfc: Use memcpy() for BIOS version</title>
<updated>2025-06-27T10:02:55Z</updated>
<author>
<name>Daniel Wagner</name>
</author>
<published>2025-04-09T11:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac7bfaa099ec3e4d7dfd0ab9726fc3bc7911365d'/>
<id>urn:sha1:ac7bfaa099ec3e4d7dfd0ab9726fc3bc7911365d</id>
<content type='text'>
[ Upstream commit ae82eaf4aeea060bb736c3e20c0568b67c701d7d ]

The strlcat() with FORTIFY support is triggering a panic because it
thinks the target buffer will overflow although the correct target
buffer size is passed in.

Anyway, instead of memset() with 0 followed by a strlcat(), just use
memcpy() and ensure that the resulting buffer is NULL terminated.

BIOSVersion is only used for the lpfc_printf_log() which expects a
properly terminated string.

Signed-off-by: Daniel Wagner &lt;wagi@kernel.org&gt;
Link: https://lore.kernel.org/r/20250409-fix-lpfc-bios-str-v1-1-05dac9e51e13@kernel.org
Reviewed-by: Justin Tee &lt;justin.tee@broadcom.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: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine</title>
<updated>2025-06-04T12:32:34Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2025-01-31T00:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82f3c2e2a434de1cfc91bc0e716664eef803eec4'/>
<id>urn:sha1:82f3c2e2a434de1cfc91bc0e716664eef803eec4</id>
<content type='text'>
[ Upstream commit 56c3d809b7b450379162d0b8a70bbe71ab8db706 ]

After a port swap between separate fabrics, there may be multiple nodes in
the vport's fc_nodes list with the same fabric well known address.
Duplication is temporary and eventually resolves itself after dev_loss_tmo
expires, but nameserver queries may still occur before dev_loss_tmo.  This
possibly results in returning stale fabric ndlp objects.  Fix by adding an
nlp_state check to ensure the ndlp search routine returns the correct newer
allocated ndlp fabric object.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Link: https://lore.kernel.org/r/20250131000524.163662-5-justintee8345@gmail.com
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: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()</title>
<updated>2024-09-04T11:14:55Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2024-01-31T18:50:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ef9c38cd04672a0f23f1f3c068318b22ef629cd'/>
<id>urn:sha1:6ef9c38cd04672a0f23f1f3c068318b22ef629cd</id>
<content type='text'>
[ Upstream commit 3d0f9342ae200aa1ddc4d6e7a573c6f8f068d994 ]

A static code analyzer tool indicates that the local variable called status
in the lpfc_sli4_repost_sgl_list() routine could be used to print garbage
uninitialized values in the routine's log message.

Fix by initializing to zero.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Link: https://lore.kernel.org/r/20240131185112.149731-2-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@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: lpfc: Update lpfc_ramp_down_queue_handler() logic</title>
<updated>2024-05-17T09:43:50Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2024-03-05T20:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ffd47decade3ec9b788da613b8dd3ed961a14ba'/>
<id>urn:sha1:2ffd47decade3ec9b788da613b8dd3ed961a14ba</id>
<content type='text'>
[ Upstream commit bb011631435c705cdeddca68d5c85fd40a4320f9 ]

Typically when an out of resource CQE status is detected, the
lpfc_ramp_down_queue_handler() logic is called to help reduce I/O load by
reducing an sdev's queue_depth.

However, the current lpfc_rampdown_queue_depth() logic does not help reduce
queue_depth.  num_cmd_success is never updated and is always zero, which
means new_queue_depth will always be set to sdev-&gt;queue_depth.  So,
new_queue_depth = sdev-&gt;queue_depth - new_queue_depth always sets
new_queue_depth to zero.  And, scsi_change_queue_depth(sdev, 0) is
essentially a no-op.

Change the lpfc_ramp_down_queue_handler() logic to set new_queue_depth
equal to sdev-&gt;queue_depth subtracted from number of times num_rsrc_err was
incremented.  If num_rsrc_err is &gt;= sdev-&gt;queue_depth, then set
new_queue_depth equal to 1.  Eventually, the frequency of Good_Status
frames will signal SCSI upper layer to auto increase the queue_depth back
to the driver default of 64 via scsi_handle_queue_ramp_up().

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Link: https://lore.kernel.org/r/20240305200503.57317-5-justintee8345@gmail.com
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: lpfc: Fix possible memory leak in lpfc_rcv_padisc()</title>
<updated>2024-04-13T10:51:38Z</updated>
<author>
<name>Justin Tee</name>
</author>
<published>2024-01-31T18:50:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2cd32435b1dff3d63759476a3abc878e02fb6c8'/>
<id>urn:sha1:e2cd32435b1dff3d63759476a3abc878e02fb6c8</id>
<content type='text'>
[ Upstream commit 2ae917d4bcab80ab304b774d492e2fcd6c52c06b ]

The call to lpfc_sli4_resume_rpi() in lpfc_rcv_padisc() may return an
unsuccessful status.  In such cases, the elsiocb is not issued, the
completion is not called, and thus the elsiocb resource is leaked.

Check return value after calling lpfc_sli4_resume_rpi() and conditionally
release the elsiocb resource.

Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Link: https://lore.kernel.org/r/20240131185112.149731-3-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@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>
</feed>
