From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>,
"agk@redhat.com" <agk@redhat.com>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND v2] dm: Fix use-after-free in dm_cleanup_zoned_dev()
Date: Wed, 23 Feb 2022 12:19:49 +0900 [thread overview]
Message-ID: <cf99d18e-d8e5-cd41-5541-9d1e1d81adc8@opensource.wdc.com> (raw)
In-Reply-To: <CAH6w=ayrR0yRCumgjtyB+mt_+33S6PHxBQDcwYVcuQ79ECYd7A@mail.gmail.com>
On 2/23/22 12:02, Mike Snitzer wrote:
> On Thu, Feb 17, 2022 at 5:49 AM Damien Le Moal
> <damien.lemoal@opensource.wdc.com> wrote:
>>
>> On 2/17/22 19:13, Kirill Tkhai wrote:
>>>
>>> dm_cleanup_zoned_dev() uses queue, so it must be called
>>> before blk_cleanup_disk() starts its killing:
>>>
>>> blk_cleanup_disk->blk_cleanup_queue()->kobject_put()->blk_release_queue()->
>>> ->...RCU...->blk_free_queue_rcu()->kmem_cache_free()
>>>
>>> Otherwise, RCU callback may be executed first,
>>> and dm_cleanup_zoned_dev() touches freed memory:
>>
>> Mike,
>>
>> Can you queue this please ?
>
> I queued it earlier today, please see:
> https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-5.18&id=588b7f5df0cb64f281290c7672470c006abe7160
>
> Thanks,
> Mike
Thanks !
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2022-02-23 3:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c64d2143-284e-7621-440c-971e3405b4d8@virtuozzo.com>
2022-02-17 10:13 ` Kirill Tkhai
2022-02-17 10:49 ` Damien Le Moal
2022-02-23 3:02 ` Mike Snitzer
2022-02-23 3:19 ` Damien Le Moal [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=cf99d18e-d8e5-cd41-5541-9d1e1d81adc8@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@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®