linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: Fixes tag needs some work in the scsi-fixes tree
@ 2020-06-24  7:07 Stephen Rothwell
  2020-06-24  7:14 ` SeongJae Park
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2020-06-24  7:07 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, SeongJae Park

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

Hi all,

In commit

  46da547e21d6 ("scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()")

Fixes tag

  Fixes: 1ffdd2c0440d ("scsi: lpfc: resolve static checker warning inlpfc_sli4_hba_unset")

has these problem(s):

  - Subject does not match target commit subject
    Just use
	git log -1 --format='Fixes: %h ("%s")'

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Fixes tag needs some work in the scsi-fixes tree
  2020-06-24  7:07 linux-next: Fixes tag needs some work in the scsi-fixes tree Stephen Rothwell
@ 2020-06-24  7:14 ` SeongJae Park
  2020-06-24  7:17   ` [PATCH v2] scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset() SeongJae Park
  2020-06-24  7:23   ` linux-next: Fixes tag needs some work in the scsi-fixes tree Stephen Rothwell
  0 siblings, 2 replies; 4+ messages in thread
From: SeongJae Park @ 2020-06-24  7:14 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin K. Petersen, Linux Next Mailing List,
	Linux Kernel Mailing List, SeongJae Park

On Wed, 24 Jun 2020 17:07:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> 
> [-- Attachment #1: Type: text/plain, Size: 385 bytes --]
> 
> Hi all,
> 
> In commit
> 
>   46da547e21d6 ("scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()")
> 
> Fixes tag
> 
>   Fixes: 1ffdd2c0440d ("scsi: lpfc: resolve static checker warning inlpfc_sli4_hba_unset")
> 
> has these problem(s):
> 
>   - Subject does not match target commit subject
>     Just use
> 	git log -1 --format='Fixes: %h ("%s")'

Oops, sorry for the mistake.  I will send the fixed version in reply to this.


Thanks,
SeongJae Park

> 
> -- 
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
  2020-06-24  7:14 ` SeongJae Park
@ 2020-06-24  7:17   ` SeongJae Park
  2020-06-24  7:23   ` linux-next: Fixes tag needs some work in the scsi-fixes tree Stephen Rothwell
  1 sibling, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2020-06-24  7:17 UTC (permalink / raw)
  To: sfr; +Cc: martin.petersen, linux-next, linux-kernel, SeongJae Park

From: SeongJae Park <sjpark@amazon.de>

Commit cdb42becdd40 ("scsi: lpfc: Replace io_channels for nvme and fcp
with general hdw_queues per cpu") has introduced static checker warnings
for potential null dereferences in 'lpfc_sli4_hba_unset()' and
commit 1ffdd2c0440d ("scsi: lpfc: resolve static checker warning in
lpfc_sli4_hba_unset") has tried to fix it.  However, yet another
potential null dereference is remaining.  This commit fixes it.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Fixes: 1ffdd2c0440d ("scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset")
Fixes: cdb42becdd40 ("scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu")
Signed-off-by: SeongJae Park <sjpark@amazon.de>
---
 drivers/scsi/lpfc/lpfc_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 69a5249e007a..6637f84a3d1b 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -11878,7 +11878,8 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba)
 	lpfc_sli4_xri_exchange_busy_wait(phba);
 
 	/* per-phba callback de-registration for hotplug event */
-	lpfc_cpuhp_remove(phba);
+	if (phba->pport)
+		lpfc_cpuhp_remove(phba);
 
 	/* Disable PCI subsystem interrupt */
 	lpfc_sli4_disable_intr(phba);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next: Fixes tag needs some work in the scsi-fixes tree
  2020-06-24  7:14 ` SeongJae Park
  2020-06-24  7:17   ` [PATCH v2] scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset() SeongJae Park
@ 2020-06-24  7:23   ` Stephen Rothwell
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2020-06-24  7:23 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Martin K. Petersen, Linux Next Mailing List,
	Linux Kernel Mailing List, SeongJae Park

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

Hi SeongJae,

On Wed, 24 Jun 2020 09:14:47 +0200 SeongJae Park <sjpark@amazon.com> wrote:
>
> Oops, sorry for the mistake.  I will send the fixed version in reply to this.

Unless Martin says otherwise, I am not sure it is worth fixing.  Just
remember for next time.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-24  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24  7:07 linux-next: Fixes tag needs some work in the scsi-fixes tree Stephen Rothwell
2020-06-24  7:14 ` SeongJae Park
2020-06-24  7:17   ` [PATCH v2] scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset() SeongJae Park
2020-06-24  7:23   ` linux-next: Fixes tag needs some work in the scsi-fixes tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).