From: Coly Li <colyli@suse.de>
To: Jens Axboe <axboe@kernel.dk>, Ira Weiny <ira.weiny@intel.com>
Cc: nvdimm@lists.linux.dev,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Block Devices <linux-block@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Geliang Tang <geliang.tang@suse.com>,
Hannes Reinecke <hare@suse.de>, NeilBrown <neilb@suse.de>,
Vishal L Verma <vishal.l.verma@intel.com>,
Xiao Ni <xni@redhat.com>
Subject: Re: [PATCH] badblocks: avoid checking invalid range in badblocks_check()
Date: Sun, 24 Dec 2023 10:11:03 +0800 [thread overview]
Message-ID: <98F03B8B-5A3E-463F-AB27-0AE00DC27CB9@suse.de> (raw)
In-Reply-To: <0eef6feb-4775-4249-af74-9fccb093b6bc@kernel.dk>
> 2023年12月24日 09:38,Jens Axboe <axboe@kernel.dk> 写道:
>
> On 12/23/23 5:32 PM, Coly Li wrote:
>>> 2023?12?24? 08:28?Coly Li <colyli@suse.de> ???
>>>
>>> If prev_badblocks() returns '-1', it means no valid badblocks record
>>> before the checking range. It doesn't make sense to check whether
>>> the input checking range is overlapped with the non-existed invalid
>>> front range.
>>>
>>> This patch checkes whether 'prev >= 0' is true before calling
>>> overlap_front(), to void such invalid operations.
>>>
>>> Fixes: 3ea3354cb9f0 ("badblocks: improve badblocks_check() for multiple ranges handling")
>>> Reported-and-tested-by: Ira Weiny <ira.weiny@intel.com>
>>> Signed-off-by: Coly Li <colyli@suse.de>
>>> Link: https://lore.kernel.org/nvdimm/3035e75a-9be0-4bc3-8d4a-6e52c207f277@leemhuis.info/
>>> Cc: Dan Williams <dan.j.williams@intel.com>
>>> Cc: Geliang Tang <geliang.tang@suse.com>
>>> Cc: Hannes Reinecke <hare@suse.de>
>>> Cc: Jens Axboe <axboe@kernel.dk>
>>> Cc: NeilBrown <neilb@suse.de>
>>> Cc: Vishal L Verma <vishal.l.verma@intel.com>
>>> Cc: Xiao Ni <xni@redhat.com>
>>> ---
>>> block/badblocks.c | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> Hi Jens,
>>
>> Is it possible to take this fix into 6.7 still? Thanks in advance.
>
> Yep, we're still a few weeks out, so not a problem.
Jes and Ira,
Thank you all for fast response during holidays.
Happy holidays and merry Christmas!
Coly Li
next prev parent reply other threads:[~2023-12-24 2:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-24 0:28 Coly Li
2023-12-24 0:32 ` Coly Li
2023-12-24 1:38 ` Jens Axboe
2023-12-24 2:11 ` Coly Li [this message]
2023-12-24 1:38 ` Jens Axboe
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=98F03B8B-5A3E-463F-AB27-0AE00DC27CB9@suse.de \
--to=colyli@suse.de \
--cc=axboe@kernel.dk \
--cc=dan.j.williams@intel.com \
--cc=geliang.tang@suse.com \
--cc=hare@suse.de \
--cc=ira.weiny@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--cc=xni@redhat.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
all inboxes | Powered by JetHome®