Message ID | 1720592772-19904-1-git-send-email-zhang.chuna@h3c.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6958AC38150 for <linux-mm@archiver.kernel.org>; Wed, 10 Jul 2024 06:25:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C50B86B0083; Wed, 10 Jul 2024 02:25:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD8E06B0089; Wed, 10 Jul 2024 02:25:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A79AD6B008A; Wed, 10 Jul 2024 02:25:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 888676B0083 for <linux-mm@kvack.org>; Wed, 10 Jul 2024 02:25:31 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 34A0DA503D for <linux-mm@kvack.org>; Wed, 10 Jul 2024 06:25:31 +0000 (UTC) X-FDA: 82322856462.25.9C9D67C Received: from h3cspam02-ex.h3c.com (smtp.h3c.com [60.191.123.50]) by imf18.hostedemail.com (Postfix) with ESMTP id C4EEC1C0017 for <linux-mm@kvack.org>; Wed, 10 Jul 2024 06:25:27 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of zhang.chunA@h3c.com designates 60.191.123.50 as permitted sender) smtp.mailfrom=zhang.chunA@h3c.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720592697; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=O5Gd+2W3kqJlCWzO+yx1rflzAncKJwHT5nB0IUGnz0U=; b=1Wqau6h3/mczR8XcQqFwzn6O3KmDW+GkDQ/9wcFbP5P+RHQKfMwgffjkcDyeGgL7S4zx5P koVP72Fmx1r03bwTY6Ss0DQBlUH2jBxW/Mqemwxkd15FZkyxyfaBiQcMTmmI9A31nRqBY1 Fd0KxhnAHYlLt5qFS2f9tQ7RpqStLCg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720592697; a=rsa-sha256; cv=none; b=L5jYhzOjmXe81oZvqipIgyuPd1KT0XMO4exQSGx4xWPa5Ww8FUTWWQg+PyCqGgawBItKSM FZhp3+dTVj0Rt3z+LGnz7oGd3bmPvGnXLIbom3gX1FLpqC+tl8kYUZVYVhXNvu6bbtD8kE uB44TEoTncT9vEN4qIF3PhRIG9EhCd4= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of zhang.chunA@h3c.com designates 60.191.123.50 as permitted sender) smtp.mailfrom=zhang.chunA@h3c.com; dmarc=none Received: from mail.maildlp.com ([172.25.15.154]) by h3cspam02-ex.h3c.com with ESMTP id 46A6Oj9O095773; Wed, 10 Jul 2024 14:24:45 +0800 (GMT-8) (envelope-from zhang.chunA@h3c.com) Received: from DAG6EX09-BJD.srv.huawei-3com.com (unknown [10.153.34.11]) by mail.maildlp.com (Postfix) with ESMTP id B129220081BA; Wed, 10 Jul 2024 14:29:00 +0800 (CST) Received: from localhost.localdomain.com (10.99.206.13) by DAG6EX09-BJD.srv.huawei-3com.com (10.153.34.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.27; Wed, 10 Jul 2024 14:24:46 +0800 From: zhangchun <zhang.chuna@h3c.com> To: <akpm@linux-foundation.org> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <jiaoxupo@h3c.com>, <zhang.zhengming@h3c.com>, <zhang.zhansheng@h3c.com>, <shaohaojize@126.com>, zhangchun <zhang.chuna@h3c.com> Subject: [PATCH] =?utf-8?q?mm=3A_Give_kmap=5Flock_before_call_flush=5Ftlb=5F?= =?utf-8?q?kernel=5Frang=EF=BC=8Cavoid_kmap=5Fhigh_deadlock_V2=2E?= Date: Wed, 10 Jul 2024 14:26:12 +0800 Message-ID: <1720592772-19904-1-git-send-email-zhang.chuna@h3c.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.99.206.13] X-ClientProxiedBy: BJSMTP01-EX.srv.huawei-3com.com (10.63.20.132) To DAG6EX09-BJD.srv.huawei-3com.com (10.153.34.11) X-DNSRBL: X-MAIL: h3cspam02-ex.h3c.com 46A6Oj9O095773 X-Stat-Signature: mohw9m6zjons55p4baxg88ub1zb1z4kw X-Rspamd-Queue-Id: C4EEC1C0017 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1720592727-638360 X-HE-Meta: U2FsdGVkX19SMlSD87dVoLKas2hw4eSKj/y9tUX1Iaxf6l83gzjhsOggjZfUGwPEkc6O4QLPDJGw2SQP6+2GuHZC4FXXA42yHRREAZsVxg23NUW9Z4mG+YSjdV0EBkeSveH6JKRjb8O2h7HzHBxylaxvVqs2Rh68DHEAmtox0s+A3AoUhvBaNLx8/SqyTL21Xg0uinc4ZvnSh2NjIVB/w6lt6oQDj7ALu33sr3bhMmHRD9ZYb3cP92h1cBCNL4xoDyMhNynfC1VV+kUk9z/P/ws80I498pjp7zH33yF93T/L8uWI4jfGRDCtgEi/cKsCk5wtkKRohjTi6qBwzfjG8x/vapUZA6o8d1+voG9QplRQoo2tmYHwQR+zkRXgDtcNwAjnxeNNaqf4M0fzgtFnMhIVj97hUz3vq+RcwFxAqd8OjEZzl5EDBq+vGlJdmdnzhZTXMEsC2D6tqKeifpjbCoxMlhzdpU/JshBkmMBQ5lWCorFyzdynp3Ns1XJzWF1SEYvMH3mzlYeL4DZdqZ/olBAZwx6NGs3ypKVh+d2WaBik0RqAH6F+bggKN/N7B/5OETsWzONVSq5ZlyMgPVwpOEykJd68yvSlYQtQ7vVIdWiiWZhsptyZIC4NPD+5fVaco54pnMbIjQ23VORAOsjobcnU5X5Mq0N/DK+5kOnP+KtKDOHvs8uoGr/l3kL5SPoeRc8yvOQoGiAzfUD974wgbj5vMyazWrNOdqmTeo9N5Cnx/5Z5z9gEzXbS62kILXEQyXzLgkmsbQI4lXtB+9nmtPqNK3cR06qBcVY+gsGk4tkPt5JqVzRQyb+mYJtvBIcBjVekjIlbOJskVN3gLVsdJ8bB7T5q3d0Sci890euGHOPyMD6wWNDhkgSqTDpY6jfvG3qd73yQal07uZotXDZgqv5IHURpQXi7v9+kg40FoTW2rRw+oAVDJDaD//zeJTxCv9XHEMoPhjZlilyePOf HvWoerSS hcS8bgBnV+t0Q+eXs1dL/6AgfJY9yUYAayGAkJFH8AtRL9r8eJcn76BXmjiYJ1damPIp0BbXbxzt9ovcV7XQkfLYZ4TASAjBwowKiKgQzVNTBpZEnq6D3sFVwrXRy3Uta3hx047MMcmvHtEsewHF5+AcDkiVuxc3C9Lq0rNat/k+v7877rG1VX+ni/5Qz8o/K5pZXXgVREdRQ8Wo/wDzlzIZhI92usjo9Ly6AR6D2OB5m4gHSmB4EJXK9rPUPYAdLFy2LFd110Hk7c9BaMgUmzhxXEHHGOX4h32Cj+/1QqypO9ZYPCKQ30ANxpA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock V2.
|
expand
|
diff --git a/mm/highmem.c b/mm/highmem.c index bd48ba4..841b370 100644 --- a/mm/highmem.c +++ 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) { + unlock_kmap(); flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP)); + lock_kmap(); + } } void __kmap_flush_unused(void)