From: zhangchun <zhang.chuna@h3c.com>
To: <willy@infradead.org>
Cc: <akpm@linux-foundation.org>, <jiaoxupo@h3c.com>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<shaohaojize@126.com>, <zhang.chuna@h3c.com>,
<zhang.zhansheng@h3c.com>, <zhang.zhengming@h3c.com>
Subject: [PATCH] mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock V2.
Date: Wed, 10 Jul 2024 11:07:51 +0800 [thread overview]
Message-ID: <1720580871-27946-1-git-send-email-zhang.chuna@h3c.com> (raw)
In-Reply-To: <Zo0laCcWwAoL0bFu@casper.infradead.org>
>> +++ 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?
Thanks! Using lock_map/unlock_kmap is better.
Patch V2 will be sent.
1.8.3.1
next prev parent reply other threads:[~2024-07-10 3:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 9:17 [PATCH] mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock zhangchun
2024-07-09 11:56 ` Matthew Wilcox
2024-07-10 3:07 ` zhangchun [this message]
2024-07-10 6:26 [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=1720580871-27946-1-git-send-email-zhang.chuna@h3c.com \
--to=zhang.chuna@h3c.com \
--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=willy@infradead.org \
--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