Message ID | 7caa255fa5fe4e8e9c6a05084a1faf72@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 29F6CC3064D for <linux-mm@archiver.kernel.org>; Tue, 2 Jul 2024 04:27:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F23D6B0085; Tue, 2 Jul 2024 00:27:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A2336B0089; Tue, 2 Jul 2024 00:27:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 642AA6B008A; Tue, 2 Jul 2024 00:27:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 44DA66B0085 for <linux-mm@kvack.org>; Tue, 2 Jul 2024 00:27:21 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E48C71A1ECE for <linux-mm@kvack.org>; Tue, 2 Jul 2024 04:27:20 +0000 (UTC) X-FDA: 82293528240.19.9099A3A Received: from h3cspam02-ex.h3c.com (smtp.h3c.com [60.191.123.50]) by imf19.hostedemail.com (Postfix) with ESMTP id 49FB61A0004 for <linux-mm@kvack.org>; Tue, 2 Jul 2024 04:27:17 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of zhang.chunA@h3c.com designates 60.191.123.50 as permitted sender) smtp.mailfrom=zhang.chunA@h3c.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719894417; 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=r66APsfbuZwhaGtdICg8m8ISseHQCJgnvESBj7Fq7W0=; b=xJ/FU3ZnLinhibnltzD5NMej8ues3wrft0UglNff45QU8FfcvEIDJzg2nCqw3dxzLCvtN0 yR2dssChRMu2wsk2Z+pZbTABtZq3VHFN1RtLClr3BTVZbUDEMM2z7FSSfYRAEqL/6sndvm vkERpZLjP8h+BBOgWtnjhdnTb6p22us= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719894417; a=rsa-sha256; cv=none; b=CqbM7sSK0MY3txDdkjXXxfStRupAdkxprN4Lk9DWs3ZUoc9a/7wqXd8HuR0OJokP5yVjlK 1vqpAiNUNUB5eSx7983wyWrkZCOGJziWoUT1Vahu6VpyAZcF4KqiIVIuVOKwPKvplkhD9O 6mbvbqqL/UXmm76G9DwVhfZ96lwAKac= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of zhang.chunA@h3c.com designates 60.191.123.50 as permitted sender) smtp.mailfrom=zhang.chunA@h3c.com Received: from mail.maildlp.com ([172.25.15.154]) by h3cspam02-ex.h3c.com with ESMTP id 4624QwPG039760; Tue, 2 Jul 2024 12:26:58 +0800 (GMT-8) (envelope-from zhang.chunA@h3c.com) Received: from DAG6EX11-BJD.srv.huawei-3com.com (unknown [10.153.34.13]) by mail.maildlp.com (Postfix) with ESMTP id 630F62004BA2; Tue, 2 Jul 2024 12:31:02 +0800 (CST) Received: from DAG6EX09-BJD.srv.huawei-3com.com (10.153.34.11) by DAG6EX11-BJD.srv.huawei-3com.com (10.153.34.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27; Tue, 2 Jul 2024 12:26:59 +0800 Received: from DAG6EX09-BJD.srv.huawei-3com.com ([fe80::bdc5:ad7:2347:12a5]) by DAG6EX09-BJD.srv.huawei-3com.com ([fe80::bdc5:ad7:2347:12a5%4]) with mapi id 15.02.1258.027; Tue, 2 Jul 2024 12:26:59 +0800 From: Zhangchun <zhang.chunA@h3c.com> To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Jiaoxupo <jiaoxupo@h3c.com>, Bailin <berlin@h3c.com>, Zhangzhansheng <zhang.zhansheng@h3c.com>, "linux-mm@kvack.org" <linux-mm@kvack.org>, wangyu <wang.yuI@h3c.com>, "shaohaojize@126.com" <shaohaojize@126.com>, Zhangzhengming <zhang.zhengming@h3c.com> Subject: [PATCH] mm: fix kmap_high deadlock V2 Thread-Topic: [PATCH] mm: fix kmap_high deadlock V2 Thread-Index: AdrMNwI2VvTxTh3MSgCT1mPrIo0cfgAAO7Gg Date: Tue, 2 Jul 2024 04:26:59 +0000 Message-ID: <7caa255fa5fe4e8e9c6a05084a1faf72@h3c.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.135.168.35] x-sender-location: DAG2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-DNSRBL: X-MAIL: h3cspam02-ex.h3c.com 4624QwPG039760 X-Rspamd-Queue-Id: 49FB61A0004 X-Stat-Signature: wks7pmx38umuzm3fboby4bhen4ypjfrp X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719894437-309839 X-HE-Meta: U2FsdGVkX19Op5TwIDOglonmSEo2ye79mh2iDrJHSDybuypiWxafnI+uKP+1m9FfR/b/+o6c6gCBRH9nYkA6qQYVsX++k0VHRyx7KOBFfOdO4cgBSvtYmOiKxcdpA9l3shI+7fQGLWF0lA5oKzU1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Z2vg9RKpOjYCpXlhX+EoIHVKPwN/RQX8gpoAFi0Y4J5v5gningfjBflf9wgVfjIL9QjUXmMhP+Ni53rrSUnS94fnk6Z9euRU0XQwHfapY6IN8xzwwnAPQGrsgEi7XfbauuP9cG544Bic8D1FMGtv83IU58oaZwEEhs37n 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: fix 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) { + spin_unlock(&kmap_lock); flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP)); + spin_lock(&kmap_lock); + } } void __kmap_flush_unused(void)