All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saurav Kashyap <skashyap@marvell.com>
To: Himanshu Madhani <himanshu.madhani@oracle.com>,
	Nilesh Javali <njavali@marvell.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	GR-QLogic-Storage-Upstream
	<GR-QLogic-Storage-Upstream@marvell.com>
Subject: RE: [PATCH 02/16] qla2xxx: Implement ref count for srb
Date: Mon, 3 Jan 2022 03:56:06 +0000	[thread overview]
Message-ID: <DM6PR18MB30347380BBCF7EAF7EDA92C1D2499@DM6PR18MB3034.namprd18.prod.outlook.com> (raw)
In-Reply-To: <02990604-CC38-42ED-B3D6-11CCA0C5D43E@oracle.com>

Hi Himanshu,

> -----Original Message-----
> From: Himanshu Madhani <himanshu.madhani@oracle.com>
> Sent: Monday, January 3, 2022 6:03 AM
> To: Nilesh Javali <njavali@marvell.com>
> Cc: Martin Petersen <martin.petersen@oracle.com>; linux-
> scsi@vger.kernel.org; GR-QLogic-Storage-Upstream <GR-QLogic-Storage-
> Upstream@marvell.com>
> Subject: Re: [PATCH 02/16] qla2xxx: Implement ref count for srb
> 
> 
> 
> > On Dec 23, 2021, at 11:06 PM, Nilesh Javali <njavali@marvell.com> wrote:
> >
> > From: Saurav Kashyap <skashyap@marvell.com>
> >
> > Fix race between timeout handler and completion handler by introducing
> > a reference counter. One reference is taken for the normal code path
> > (the 'good case') and one for the timeout path.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Daniel Wagner <dwagner@suse.de>
> > Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
> > Signed-off-by: Nilesh Javali <njavali@marvell.com>
> > ---
> > drivers/scsi/qla2xxx/qla_bsg.c    |  6 ++-
> > drivers/scsi/qla2xxx/qla_def.h    |  5 ++
> > drivers/scsi/qla2xxx/qla_edif.c   |  3 +-
> > drivers/scsi/qla2xxx/qla_gbl.h    |  1 +
> > drivers/scsi/qla2xxx/qla_gs.c     | 85 +++++++++++++++++++++----------
> > drivers/scsi/qla2xxx/qla_init.c   | 70 +++++++++++++++++--------
> > drivers/scsi/qla2xxx/qla_inline.h |  2 +
> > drivers/scsi/qla2xxx/qla_iocb.c   | 41 +++++++++++----
> > drivers/scsi/qla2xxx/qla_mbx.c    |  4 +-
> > drivers/scsi/qla2xxx/qla_mid.c    |  4 +-
> > drivers/scsi/qla2xxx/qla_mr.c     |  4 +-
> > drivers/scsi/qla2xxx/qla_os.c     | 14 +++--
> > drivers/scsi/qla2xxx/qla_target.c |  4 +-
> > 13 files changed, 173 insertions(+), 70 deletions(-)
> >
> > diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
> > index 9da8034ccad4..c2f00f076f79 100644
> > --- a/drivers/scsi/qla2xxx/qla_bsg.c
> > +++ b/drivers/scsi/qla2xxx/qla_bsg.c
> > @@ -29,7 +29,8 @@ void qla2x00_bsg_job_done(srb_t *sp, int res)
> > 	    "%s: sp hdl %x, result=%x bsg ptr %p\n",
> > 	    __func__, sp->handle, res, bsg_job);
> >
> > -	sp->free(sp);
> > +	/* ref: INIT */
> 
> IMO, There is no need for this comment spread in this patch. Please explain If
> you think there is need for comment.

<SK> Thanks for the review. The sp reference can be taken and released on various paths. These comments make 
life simpler during some ref issue and also make code more understandable. For various scenarios, this comments
helps in determining final reference count and check if its released properly or not.

Thanks,
~Saurav


  reply	other threads:[~2022-01-03  3:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  7:06 [PATCH 00/16] qla2xxx misc bug fixes and features Nilesh Javali
2021-12-24  7:06 ` [PATCH 01/16] qla2xxx: Refactor asynchronous command initialization Nilesh Javali
2022-01-03  0:32   ` Himanshu Madhani
2021-12-24  7:06 ` [PATCH 02/16] qla2xxx: Implement ref count for srb Nilesh Javali
2021-12-28 11:12   ` Daniel Wagner
2021-12-28 11:31     ` Saurav Kashyap
2022-01-03  0:32   ` Himanshu Madhani
2022-01-03  3:56     ` Saurav Kashyap [this message]
2022-01-04 12:32       ` Daniel Wagner
2022-01-05  1:55         ` Himanshu Madhani
2022-01-05  4:28           ` Saurav Kashyap
2021-12-24  7:06 ` [PATCH 03/16] qla2xxx: fix stuck session in gpdb Nilesh Javali
2022-01-03  0:34   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 04/16] qla2xxx: Fix warning message due to adisc is being flush Nilesh Javali
2022-01-03  0:37   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 05/16] qla2xxx: Fix premature hw access after pci error Nilesh Javali
2022-01-03  0:39   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 06/16] qla2xxx: Fix scheduling while atomic Nilesh Javali
2022-01-03  0:41   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 07/16] qla2xxx: add retry for exec fw Nilesh Javali
2022-01-03  0:42   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 08/16] qla2xxx: Show wrong FDMI data for 64G adaptor Nilesh Javali
2022-01-03  0:43   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 09/16] qla2xxx: Add ql2xnvme_queues module param to configure number of NVME queues Nilesh Javali
2022-01-03  0:44   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 10/16] qla2xxx: Fix device reconnect in loop topology Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 11/16] qla2xxx: fix warning for missing error code Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 12/16] qla2xxx: edif: Fix clang warning Nilesh Javali
2022-01-03  0:47   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 13/16] qla2xxx: Fix T10 PI tag escape and IP guard options for 28XX adapters Nilesh Javali
2022-01-03  0:48   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 14/16] qla2xxx: Add devid's and conditionals for 28xx Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani
2022-01-03 16:02     ` Nilesh Javali
2022-01-06  0:55     ` Arun Easi
2021-12-24  7:07 ` [PATCH 15/16] qla2xxx: Suppress a kernel complaint in qla_create_qpair() Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 16/16] qla2xxx: Update version to 10.02.07.300-k Nilesh Javali
2022-01-03  0:53   ` Himanshu Madhani

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=DM6PR18MB30347380BBCF7EAF7EDA92C1D2499@DM6PR18MB3034.namprd18.prod.outlook.com \
    --to=skashyap@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=himanshu.madhani@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@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 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.