All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Xiaomeng Tong <xiam0nd.tong@gmail.com>,
	ALIM AKHTAR <alim.akhtar@samsung.com>
Cc: "avri.altman@wdc.com" <avri.altman@wdc.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Daejun Park <daejun7.park@samsung.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	Keoseong Park <keosung.park@samsung.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jakobkoschel@gmail.com" <jakobkoschel@gmail.com>
Subject: RE: [PATCH v2] ufs: fix an NULL check on list iterator
Date: Mon, 21 Mar 2022 22:17:08 +0900	[thread overview]
Message-ID: <1891546521.01647903181504.JavaMail.epsvc@epcpadp4> (raw)
In-Reply-To: <20220320150733.21824-1-xiam0nd.tong@gmail.com>

Hi Xiaomeng Tong,

>The list iterator is always non-NULL so the check 'if (!rgn)'
>is always false and the dev_err() is never called. Move the
>check outside the loop and determine if 'victim_rgn' is NULL,
>to fix this bug.
> 
>Fixes: 4b5f49079c52a ("scsi: ufs: ufshpb: L2P map management for HPB read")
>Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
>---

Good catch. Free to add my reviewed-by tag.

Reviewed-by: Daejun Park <daejun7.park@samsung.com>

Thanks,
Daejun

      reply	other threads:[~2022-03-21 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220320150754epcas2p3ffdbcd31ff5f4432e8d0a1106c91d729@epcms2p6>
2022-03-20 15:07 ` [PATCH v2] ufs: fix an NULL check on list iterator Xiaomeng Tong
2022-03-21 13:17   ` Daejun Park [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=1891546521.01647903181504.JavaMail.epsvc@epcpadp4 \
    --to=daejun7.park@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jakobkoschel@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=keosung.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    --cc=xiam0nd.tong@gmail.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.