public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jinhong Zhu <jinhongzhu@hust.edu.cn>
Cc: Saurav Kashyap <skashyap@marvell.com>,
	Javed Hasan <jhasan@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Manish Rangankar <manish.rangankar@cavium.com>,
	Arun Easi <arun.easi@cavium.com>,
	Nilesh Javali <nilesh.javali@cavium.com>,
	Dan Carpenter <error27@gmail.com>,
	Saurav Kashyap <saurav.kashyap@cavium.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi: qedf: Fix NULL dereference in error handling
Date: Sat, 06 May 2023 18:45:18 -0400	[thread overview]
Message-ID: <yq1fs892i6h.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20230502140022.2852-1-jinhongzhu@hust.edu.cn> (Jinhong Zhu's message of "Tue, 2 May 2023 22:00:21 +0800")


Jinhong,

> Smatch reported:
>
> drivers/scsi/qedf/qedf_main.c:3056 qedf_alloc_global_queues()
> warn: missing unwind goto?
>
> At this point in the function, nothing has been allocated so we can
> return directly. In particular the "qedf->global_queues" have not been
> allocated so calling qedf_free_global_queues() will lead to a NULL
> dereference when we check if (!gl[i]) and "gl" is NULL.

Applied to 6.5/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2023-05-06 22:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 14:00 [PATCH v2] scsi: qedf: Fix NULL dereference in error handling Jinhong Zhu
2023-05-06 22:45 ` Martin K. Petersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1fs892i6h.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=arun.easi@cavium.com \
    --cc=error27@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=jhasan@marvell.com \
    --cc=jinhongzhu@hust.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manish.rangankar@cavium.com \
    --cc=nilesh.javali@cavium.com \
    --cc=saurav.kashyap@cavium.com \
    --cc=skashyap@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox