From: Matthew Wilcox <willy@infradead.org>
To: zhangchun <zhang.chuna@h3c.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, jiaoxupo@h3c.com,
zhang.zhengming@h3c.com, zhang.zhansheng@h3c.com,
shaohaojize@126.com
Subject: Re: [PATCH] mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock.
Date: Tue, 9 Jul 2024 12:56:24 +0100 [thread overview]
Message-ID: <Zo0laCcWwAoL0bFu@casper.infradead.org> (raw)
In-Reply-To: <1720516658-50434-1-git-send-email-zhang.chuna@h3c.com>
On Tue, Jul 09, 2024 at 05:17:38PM +0800, zhangchun wrote:
> +++ b/mm/highmem.c
> @@ -220,8 +220,11 @@ static void flush_all_zero_pkmaps(void)
> set_page_address(page, NULL);
> need_flush = 1;
> }
> - if (need_flush)
> + if (need_flush) {
> + spin_unlock(&kmap_lock);
should this be a raw spin_unlock(), or should it be unlock_kmap()?
ie when ARCH_NEEDS_KMAP_HIGH_GET is set, do we also need to re-enable
interrupts here?
> flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
> + spin_lock(&kmap_lock);
> + }
> }
>
> void __kmap_flush_unused(void)
> --
> 1.8.3.1
>
>
next prev parent reply other threads:[~2024-07-09 11:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 9:17 zhangchun
2024-07-09 11:56 ` Matthew Wilcox [this message]
2024-07-10 3:07 ` [PATCH] mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock V2 zhangchun
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=Zo0laCcWwAoL0bFu@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jiaoxupo@h3c.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shaohaojize@126.com \
--cc=zhang.chuna@h3c.com \
--cc=zhang.zhansheng@h3c.com \
--cc=zhang.zhengming@h3c.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