* [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
@ 2026-08-17 19:04 Nathan Chancellor
2026-08-21 22:46 ` Tyrel Datwyler
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nathan Chancellor @ 2026-08-17 19:04 UTC (permalink / raw)
To: Tyrel Datwyler, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linuxppc-dev, linux-kernel, llvm, Nathan Chancellor
After commit 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in work
thread"), clang warns (or errors with CONFIG_WERROR=y / W=e):
drivers/scsi/ibmvscsi/ibmvfc-core.c:6154:15: error: variable 'rport' is uninitialized when used here [-Werror,-Wuninitialized]
6154 | } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
| ^~~~~
The check for rport is unnecessary in this block, it was accidentally
included from copying and pasting. Remove it to clear up the warning.
Fixes: 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in work thread")
Suggested-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Link: https://lore.kernel.org/6ccbe8c5-beb6-483f-bfa4-c2d3819ad5f2@linux.ibm.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/scsi/ibmvscsi/ibmvfc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc-core.c b/drivers/scsi/ibmvscsi/ibmvfc-core.c
index 93b9f699c2e5..b3bc3ce872d6 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc-core.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc-core.c
@@ -6151,7 +6151,7 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost)
timer_delete_sync(&tgt->timer);
kref_put(&tgt->kref, ibmvfc_release_tgt);
return;
- } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
+ } else if (tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
tgt_dbg(tgt, "Deleting NVMe rport with outstanding I/O\n");
nvme_rport = tgt->nvme_remote_port;
ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_LOGOUT_DELETED_RPORT);
---
base-commit: 30733f28c0347d237ffb5333fdfab7a9a2d4ed34
change-id: 20260817-ibmvscsi-rport-wuninitialized-0bb7e5d05761
Best regards,
--
Cheers,
Nathan
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
2026-08-17 19:04 [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work() Nathan Chancellor
@ 2026-08-21 22:46 ` Tyrel Datwyler
2026-08-24 1:39 ` Martin K. Petersen (Oracle)
2026-08-26 15:20 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 4+ messages in thread
From: Tyrel Datwyler @ 2026-08-21 22:46 UTC (permalink / raw)
To: Nathan Chancellor, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linuxppc-dev, linux-kernel, llvm
On 8/17/26 12:04 PM, Nathan Chancellor wrote:
> After commit 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in work
> thread"), clang warns (or errors with CONFIG_WERROR=y / W=e):
>
> drivers/scsi/ibmvscsi/ibmvfc-core.c:6154:15: error: variable 'rport' is uninitialized when used here [-Werror,-Wuninitialized]
> 6154 | } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
> | ^~~~~
>
> The check for rport is unnecessary in this block, it was accidentally
> included from copying and pasting. Remove it to clear up the warning.
>
> Fixes: 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in work thread")
> Suggested-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> Link: https://lore.kernel.org/6ccbe8c5-beb6-483f-bfa4-c2d3819ad5f2@linux.ibm.com/
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
2026-08-17 19:04 [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work() Nathan Chancellor
2026-08-21 22:46 ` Tyrel Datwyler
@ 2026-08-24 1:39 ` Martin K. Petersen (Oracle)
2026-08-26 15:20 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-08-24 1:39 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Tyrel Datwyler, James E.J. Bottomley, Martin K. Petersen,
linux-scsi, linuxppc-dev, linux-kernel, llvm
Nathan,
> After commit 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in
> work thread"), clang warns (or errors with CONFIG_WERROR=y / W=e):
Applied to 7.3/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
2026-08-17 19:04 [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work() Nathan Chancellor
2026-08-21 22:46 ` Tyrel Datwyler
2026-08-24 1:39 ` Martin K. Petersen (Oracle)
@ 2026-08-26 15:20 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-08-26 15:20 UTC (permalink / raw)
To: Tyrel Datwyler, James E.J. Bottomley, Martin K. Petersen,
Nathan Chancellor
Cc: linux-scsi, linuxppc-dev, linux-kernel, llvm
On Mon, 17 Aug 2026 12:04:55 -0700, Nathan Chancellor wrote:
> After commit 696d1cc2aaa2 ("scsi: ibmvfc: process NVMe/FC rports in work
> thread"), clang warns (or errors with CONFIG_WERROR=y / W=e):
>
> drivers/scsi/ibmvscsi/ibmvfc-core.c:6154:15: error: variable 'rport' is uninitialized when used here [-Werror,-Wuninitialized]
> 6154 | } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
> | ^~~~~
>
> [...]
Applied to 7.3/scsi-queue, thanks!
[1/1] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
https://git.kernel.org/mkp/scsi/c/b79b88b655a8
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-26 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 19:04 [PATCH] scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work() Nathan Chancellor
2026-08-21 22:46 ` Tyrel Datwyler
2026-08-24 1:39 ` Martin K. Petersen (Oracle)
2026-08-26 15:20 ` Martin K. Petersen (Oracle)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.