mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guillaume Morin <guillaume@morinfr.org>
To: Yu Kuai <yukuai3@huawei.com>
Cc: Guillaume Morin <guillaume@morinfr.org>,
	Yu Kuai <yukuai1@huaweicloud.com>,
	linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	song@kernel.org
Subject: Re: [BUG] possible race between md_free_disk and md_notify_reboot
Date: Thu, 20 Feb 2025 04:45:28 +0100	[thread overview]
Message-ID: <Z7alWBZfQLlP-EO7@bender.morinfr.org> (raw)
In-Reply-To: <53e93d6e-7b73-968b-c5f2-92d1b124ecd5@huawei.com>

On 20 Feb 11:19, Yu Kuai wrote:
>
> Hi,
> 
> 在 2025/02/20 11:05, Guillaume Morin 写道:
> > how it was guaranteed that mddev_get() would fail as mddev_free() does not check or synchronize with the active atomic
> 
> Please check how mddev is freed, start from mddev_put(). There might be
> something wrong, but it's not what you said.

I will take a look. Though if you're confident that this logic protects
any uaf, that makes sense to me.

However as I mentioned this is not what the crash was about (I mentioned
the UAF in passing). The GPF seems to be about deleting the _next_
pointer while iterating over all mddevs. The mddev_get on the
current item is not going to help with this.

-- 
Guillaume Morin <guillaume@morinfr.org>

  reply	other threads:[~2025-02-20  3:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 19:43 Guillaume Morin
2025-02-20  1:26 ` Yu Kuai
2025-02-20  3:05   ` Guillaume Morin
2025-02-20  3:19     ` Yu Kuai
2025-02-20  3:45       ` Guillaume Morin [this message]
2025-02-20  4:06         ` Yu Kuai
2025-02-20 11:55           ` Yu Kuai
2025-02-20 13:39             ` Guillaume Morin
2025-02-21  1:27               ` Yu Kuai
2025-02-21 15:19                 ` Guillaume Morin
2025-02-22  1:08                   ` Yu Kuai

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=Z7alWBZfQLlP-EO7@bender.morinfr.org \
    --to=guillaume@morinfr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.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®