Messages in this thread | | | Subject | RE: [PATCH v2] ufs: fix an NULL check on list iterator | From | Daejun Park <> | Date | Mon, 21 Mar 2022 22:17:08 +0900 |
| |
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
| |