From: Jens Axboe <axboe@kernel.dk>
To: Coly Li <colyli@suse.de>
Cc: nvdimm@lists.linux.dev,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Block Devices <linux-block@vger.kernel.org>,
Ira Weiny <ira.weiny@intel.com>,
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: Sat, 23 Dec 2023 18:38:52 -0700 [thread overview]
Message-ID: <0eef6feb-4775-4249-af74-9fccb093b6bc@kernel.dk> (raw)
In-Reply-To: <A110805F-3448-4A87-AE70-F94A394EA826@suse.de>
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.
--
Jens Axboe
next prev parent reply other threads:[~2023-12-24 1:38 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 [this message]
2023-12-24 2:11 ` Coly Li
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=0eef6feb-4775-4249-af74-9fccb093b6bc@kernel.dk \
--to=axboe@kernel.dk \
--cc=colyli@suse.de \
--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®