Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2172007iof; Tue, 7 Jun 2022 22:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxifUP2WlnxcpFaBp/ZDcZ+yxmvjXHfHdk6sbFcjUENVu0FNco3RlRqaR8JoiQ+H4vXmnHT X-Received: by 2002:a17:902:e54c:b0:167:4f35:9556 with SMTP id n12-20020a170902e54c00b001674f359556mr24476901plf.5.1654664837132; Tue, 07 Jun 2022 22:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654664837; cv=none; d=google.com; s=arc-20160816; b=H/46VD7+x2Vw9P2JTrHZfAKKKA5bFjiUPimWaYn0EOe7end+PRcQa4ACU8AsHPLhzS s43tJR7+3AegOULCwAMML2S78ELjQ5QSkD8kIIWfURdxlKRLrAodFmq/hpbe75ZEGSgD sxpCXKZ/VTDnjiKtaKTPCKQDMod5jS4U3Mu+jJQkAV06c0/G2DogI3qcTdRFS/AKVBQM hbBEQ5/EyAt/IlKhWQN3ZOuxPhisGZtZEEsfkNbjAVm41bvax5HA/JEWXuB//pIwFqzd A1sSPo8enjjLiec2TESDQPXY9qzG8tjAH+RqGf2hMx7u2Lr834WCaKW3tFh6OTKU2N0B 3QEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a9OAs7Zx8hdh79thum2CLuaSe4IUPjYjPZl074WeSJA=; b=ShKdIZx2nHkZm9bpovdM87BfowVwA6M5QtwmppuHwUEE8nGbccs94tenV3FQhdBMZT 3paPk4+IqP0S4n2z4u5r5rfpZSbv/aSQBuY3AZFISgLyekF5qpkS2lBgoLC9aoNeiDGm DCn/rGGYZwj185lA5HLkVXmdtp0u8oomN8wcKBRysBllvjIWMJgzriMDJOnkbrDJSSbk YnfknxyyB3PmjIYRr1KTPY43S5zAEuMA9Ns8TknYwjmUCleejvq0ovo+oc1zAFh6fpnz NIsENBHBvRG4L/7zfn0nJqYQDW3P+xDz3l7sJGMdoeXOoT5XKVvl87X5FqeOsjkb6M17 eZ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j8WAYktu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nn17-20020a17090b38d100b001e27c577233si34454895pjb.136.2022.06.07.22.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j8WAYktu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94FCBA33B6; Tue, 7 Jun 2022 21:36:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384227AbiFGWOD (ORCPT + 99 others); Tue, 7 Jun 2022 18:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379943AbiFGVLU (ORCPT ); Tue, 7 Jun 2022 17:11:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64830216826; Tue, 7 Jun 2022 11:52:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AA7D0B81FE1; Tue, 7 Jun 2022 18:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 110DCC385A5; Tue, 7 Jun 2022 18:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627950; bh=7Cf6JB2q1A9OGemJDYVSx1pjXiSzVu0Yuw1kwfazgNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j8WAYktuE59SSnFDLSuO//xmzhQ0Hj+SfnMSGaOYX6JP+wKdPWR7o80zz/sxZUnzz d1Wa1ttFcjYbF4tSALJj91nRViUgnsB7ysomFRFnEFyYNup8LF8QBlgpRmf3Hgwjfk nin2oHs93UVoUOmTPopKKHqTqlDZnGVaA6LKFhQU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.18 150/879] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC Date: Tue, 7 Jun 2022 18:54:28 +0200 Message-Id: <20220607165007.059045396@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mikulas Patocka [ Upstream commit 84bc4f1dbbbb5f8aa68706a96711dccb28b518e5 ] We observed the error "cacheline tracking ENOMEM, dma-debug disabled" during a light system load (copying some files). The reason for this error is that the dma_active_cacheline radix tree uses GFP_NOWAIT allocation - so it can't access the emergency memory reserves and it fails as soon as anybody reaches the watermark. This patch changes GFP_NOWAIT to GFP_ATOMIC, so that it can access the emergency memory reserves. Signed-off-by: Mikulas Patocka Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- kernel/dma/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index f8ff598596b8..ac740630c79c 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -448,7 +448,7 @@ void debug_dma_dump_mappings(struct device *dev) * other hand, consumes a single dma_debug_entry, but inserts 'nents' * entries into the tree. */ -static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT); +static RADIX_TREE(dma_active_cacheline, GFP_ATOMIC); static DEFINE_SPINLOCK(radix_lock); #define ACTIVE_CACHELINE_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1) #define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT) -- 2.35.1