[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW72021iJDQp1HnJycpkp2GQOFvL9MGWGQ1LvMbr9-bWoQ@mail.gmail.com>
Date: Thu, 17 Oct 2024 15:26:04 -0700
From: Song Liu <song@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: hch@....de, iam@...dikss.org.ru, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org, yukuai3@...wei.com, yi.zhang@...wei.com,
yangerkun@...wei.com
Subject: Re: [PATCH] md/raid10: fix null ptr dereference in raid10_size()
On Tue, Oct 8, 2024 at 6:51 PM Yu Kuai <yukuai1@...weicloud.com> wrote:
>
> From: Yu Kuai <yukuai3@...wei.com>
>
> In raid10_run() if raid10_set_queue_limits() succeed, the return value
> is set to zero, and if following procedures failed raid10_run() will
> return zero while mddev->private is still NULL, causing null ptr
> dereference in raid10_size().
>
> Fix the problem by only overwrite the return value if
> raid10_set_queue_limits() failed.
>
> Fixes: 3d8466ba68d4 ("md/raid10: use the atomic queue limit update APIs")
> Reported-and-tested-by: ValdikSS <iam@...dikss.org.ru>
> Closes: https://lore.kernel.org/all/0dd96820-fe52-4841-bc58-dbf14d6bfcc8@valdikss.org.ru/
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
Applied to md-6.12.
Thanks for the fix!
Song
Powered by blists - more mailing lists