Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp319360ybb; Thu, 28 Mar 2019 03:14:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpUFaAOh1Gb6dAuEDzZXW7L/exW1qpJQBRiEhqFccCEMvF+5K9z2oeyBFjUGDAN7anFPN5 X-Received: by 2002:a65:60c1:: with SMTP id r1mr38931952pgv.137.1553768090456; Thu, 28 Mar 2019 03:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553768090; cv=none; d=google.com; s=arc-20160816; b=XybPY/dC0wmAsjJLtdMvNWRYJbMK3H85W1cyTnBOv7QY95mNMPLMFWZ9WXalUREtQL sYXTG7ezC93aUlzahaDIYzfVEssKla7cWfK7zhute0MSbE+vPMYq7ZlzNjP4YwGklujs wNW1XFDdxBFFrJOKSaiKh7VkWqFj/JalUhbatzXWM4dDpCgZkDOPBP056Vfr1wAJpPxf jzYp5sHTfwF5ObctCUHJ0bW6gSpJOgEtEaebFHKfV2i8/YlyBN19DU2lFx2KpM+BidZv Bb5k4E6DPFZBu4Kr7mnOdS4MnqALj2i+xo3OBjULcFbaDRYreANzDtvlkuIBz+ZvSkiV YJNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BmQrZ2SPOLlZb9WfISfl6sO/V2q4g7Uz5EX2gu2/VCg=; b=kjvKfuvf09HNw03cmFatJ6EtVzdGdcTiSUo193poaMlQZvmxnEY1nFc/0rWyldZYOQ sXGS77DdPjzdqj0jXZfcuUl4Yz4Zbw98D3P7NkAUZK5nS+q1DZT9Gavfe98qr5HP9+rX x+HS/jhDPgS0ylzUHI4PGPUrQIWlfU61QOBgF6lRnSXOmz7lByASpk4LaR6oGeuiOQRs 5zcYVAKOaK+1BOKjWDTOQZxQeso/LHTyyGGSoj1SOjg87W+uQZaF/g7ut3fZnpg6E6jj JNrAQMrhZJ5kyKuvIr1TfPKwTnrz1HhRJxL7P8kITWmq4PeVqZi8aoh8XGEK0JE/u897 JK4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k21si20224147pfa.113.2019.03.28.03.14.35; Thu, 28 Mar 2019 03:14:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfC1KNx (ORCPT + 99 others); Thu, 28 Mar 2019 06:13:53 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:37918 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbfC1KNw (ORCPT ); Thu, 28 Mar 2019 06:13:52 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id EDC6E8041A; Thu, 28 Mar 2019 11:13:42 +0100 (CET) Date: Thu, 28 Mar 2019 11:13:42 +0100 From: Pavel Machek To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Douglas Anderson , Steven Rostedt Subject: Re: [PATCH AUTOSEL 5.0 011/262] tracing: kdb: Fix ftdump to not sleep Message-ID: <20190328101342.GD19456@atrey.karlin.mff.cuni.cz> References: <20190327180158.10245-1-sashal@kernel.org> <20190327180158.10245-11-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327180158.10245-11-sashal@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Douglas Anderson > > [ Upstream commit 31b265b3baaf55f209229888b7ffea523ddab366 ] > > As reported back in 2016-11 [1], the "ftdump" kdb command triggers a > BUG for "sleeping function called from invalid context". > > kdb's "ftdump" command wants to call ring_buffer_read_prepare() in > atomic context. A very simple solution for this is to add allocation > flags to ring_buffer_read_prepare() so kdb can call it without > triggering the allocation error. This patch does that. I see solution is simple, but now we have a loop with GFP_ATOMIC allocations inside. How many "tracing spus" is this expected to loop over? Will not it exhaust atomically available pages and reliably fail in common configurations? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html