From: Xiaomeng Tong <xiam0nd.tong@gmail.com>
To: snitzer@redhat.com
Cc: agk@redhat.com, dm-devel@redhat.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
xiam0nd.tong@gmail.com
Subject: Re: md: fix missing check on list iterator
Date: Sun, 3 Apr 2022 11:56:03 +0800 [thread overview]
Message-ID: <20220403035603.16169-1-xiam0nd.tong@gmail.com> (raw)
In-Reply-To: <YkcQdjE6uTfScyEy@redhat.com>
On Fri, 1 Apr 2022 10:47:18 -0400, Mike Snitzer wrote:
> Did you acually hit a bug (invalid memory access)?
>
> I cannot see how given the checks prior to iterating m->priority_groups:
>
> if (!pgstr || (sscanf(pgstr, "%u%c", &pgnum, &dummy) != 1) || !pgnum ||
> !m->nr_priority_groups || (pgnum > m->nr_priority_groups)) {
> DMWARN("invalid PG number supplied to bypass_pg");
> return -EINVAL;
> }
>
> So I have _not_ taken your "fix".
Yes, you are correct. It has been checked before, thus not a bug and
no need to fix. And I have sent a PATCH v2 to use list iterator only
inside the loop, please check it. Thank you very much.
--
Xiaomeng Tong
prev parent reply other threads:[~2022-04-03 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 5:37 [PATCH] md: fix missing check on list iterator Xiaomeng Tong
2022-04-01 14:47 ` Mike Snitzer
2022-04-03 3:56 ` Xiaomeng Tong [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=20220403035603.16169-1-xiam0nd.tong@gmail.com \
--to=xiam0nd.tong@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).