From: "Yu Kuai" <yukuai@fnnas.com>
To: "Junrui Luo" <moonafterrain@outlook.com>,
"Song Liu" <song@kernel.org>, "Li Nan" <linan122@huawei.com>,
"NeilBrown" <neil@brown.name>,
"Jonathan Brassow" <jbrassow@redhat.com>, <yukuai@fnnas.com>
Cc: <linux-raid@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Yuhao Jiang" <danisjiang@gmail.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] md/raid10: fix divide-by-zero in setup_geo() with zero far_copies
Date: Sun, 19 Apr 2026 13:43:03 +0800 [thread overview]
Message-ID: <beca1657-0180-4f9b-8de1-ca7776c9614a@fnnas.com> (raw)
In-Reply-To: <SYBPR01MB7881A5E2556806CC1D318582AF232@SYBPR01MB7881.ausprd01.prod.outlook.com>
Hi,
在 2026/4/16 11:39, Junrui Luo 写道:
> setup_geo() extracts near_copies (nc) and far_copies (fc) from the
> user-provided layout parameter without checking for zero. When fc=0
> with the "improved" far set layout selected, 'geo->far_set_size =
> disks / fc' triggers a divide-by-zero.
>
> Validate nc and fc immediately after extraction, returning -1 if
> either is zero.
>
> Fixes: 475901aff158 ("MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 1)")
> Reported-by: Yuhao Jiang<danisjiang@gmail.com>
So again I can't find a report, and Reported-by usually should be followed
by a Closes link to the original report.
Applied with Reported-by tag removed.
> Cc:stable@vger.kernel.org
> Signed-off-by: Junrui Luo<moonafterrain@outlook.com>
> ---
> drivers/md/raid10.c | 2 ++
> 1 file changed, 2 insertions(+)
--
Thansk,
Kuai
next prev parent reply other threads:[~2026-04-19 5:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 3:39 [PATCH] md/raid10: fix divide-by-zero in setup_geo() with zero far_copies Junrui Luo
2026-04-16 6:17 ` Paul Menzel
2026-04-16 10:08 ` Junrui Luo
2026-04-19 5:43 ` Yu Kuai [this message]
2026-04-19 6:01 ` Yuhao Jiang
[not found] ` <CAHYQsXRN6uof4yyDR6qGteQ=wZTt86VUx7km6k=LbNAQ3wxGiQ@mail.gmail.com>
2026-04-28 8:32 ` Yu Kuai
2026-04-28 8:37 ` Yuhao Jiang
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=beca1657-0180-4f9b-8de1-ca7776c9614a@fnnas.com \
--to=yukuai@fnnas.com \
--cc=danisjiang@gmail.com \
--cc=jbrassow@redhat.com \
--cc=linan122@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=moonafterrain@outlook.com \
--cc=neil@brown.name \
--cc=song@kernel.org \
--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