Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp450217pxb; Wed, 27 Jan 2021 11:43:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxapxht6nVzOs05viElmQLi4KJppZOKsX1iiZMIM5C9BZNKf4nHJTVYew8kdDYE0WO69gWl X-Received: by 2002:a05:6402:11d3:: with SMTP id j19mr10448253edw.314.1611776620695; Wed, 27 Jan 2021 11:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611776620; cv=none; d=google.com; s=arc-20160816; b=DR1N9aiZtgwfDIpJnt/9T2+Y19Tl/tNdziwU6FkvpGjOAIqJQy+pXx0AGm+/XDFZ/1 83u30Ahi0a+XAZAAB6alzF8o58u46F3OZ0yD7HoQNB0x7rzi0jOjo37YFwwGlGM0gvKe w3Yd4YTtQovf+wjBLavmekO0hk4FCXxjhnXCU6XkdBNfaZzcuUTuaeOIX6GdqqyhbbKR qZFCvyJOOnJVyQ0hXzXwvc19chuvmD4spKHkB49G01MSC3T1Y6cVNXHjl0oiFuSLu1tu UO+bhja6agl/1HFTTUaPJjpElo4OKFpdXJWdTHF5SPJh3QDvOEYeuxxcEzJ198bffp7/ Joxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hShbIms5NYs6IydotF01qyWzp7TZl/6azhfbVRi5o6E=; b=WQ5aw9ZLCqQ1YQBALjFjr4mGhkGC6mtYl95QqdqiXmq35Wozi2C+znWdxemBSuNxYJ M9ySwCEYxVlXUbCWB6/N5afmT3CytA5VtSwGu1mSlLWT0p083JbVgl14V5zFA7EhoQHi YM/9eFgROfUr7MdyY8BS2d+Efn0W/q4CsOPVm6cxs4FKU0eDBW4/CseNj/G7BvolblCo efsY2JIizWpMCwRrAQFuCYtOhYL1IJWy75swfuuOcvnJ2GQLN/Dctb7vLhkSLFSyILFb RpsazDLSXjDxiJ3sKd8tu/fO2ePVtO0bZ3qdZHMjD6WnG7qHcIMhn5nqmAuBgZkKsVcu JyyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MifeBThA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 25si1224224ejw.605.2021.01.27.11.42.53; Wed, 27 Jan 2021 11:43:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MifeBThA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S316897AbhAZXMD (ORCPT + 99 others); Tue, 26 Jan 2021 18:12:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728109AbhAZEsz (ORCPT ); Mon, 25 Jan 2021 23:48:55 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C54EC061794 for ; Mon, 25 Jan 2021 20:46:23 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id m6so9813279pfk.1 for ; Mon, 25 Jan 2021 20:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hShbIms5NYs6IydotF01qyWzp7TZl/6azhfbVRi5o6E=; b=MifeBThAMKqxhSVAghpvfs585hTpBPF+rXgdrGmyymQoXDyyKc09lSU1aAXf1e3QPK hN35pWvH23+2XiXI+RSMRXMOgWU1DST62Xj6vZavH5y49VwlO7cBq38+H2656v+yt2bl jtshB6qyKBH2RdBNAhBpoggs/tDXwFiIJdmobdVWXyi+GiOJZJIZSvvV2TfbY9r0NuEh W52o09PkdXfcesIyaOYT8y+WSZa4KO4b3PWWlVomvubPsG3MjZXURj1f35pwWxrG0l+p 7i1CT9tgTr91nWkvLrJYWhjN8CuGrIlCanjsVh9SfU52DYia4Rmz8+t183Oqq1JNs/xO wW4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hShbIms5NYs6IydotF01qyWzp7TZl/6azhfbVRi5o6E=; b=kDQqWMD3rCM2ukKoarFcnZP4IWkRsOS06V4hpmWsO55KQN35Pzq+hooDuZgYnGNCP2 uSvI0IYGrgl2F2irwcqpLyT+Dv10WtZsr8swtjxP4190kV9l7uNk6kGFEefQ/o52zeWV IYfQP7eE9tZqaCVnO43p4jQI54SMHFEOWtIRCwOfMjm7Jktr1Xg5LoP2xc02g9wfiDyO 0EZMPAOVdzSqFgxjuZrpU5rLSQup9S2ExmHF+Bwr8ptouO8eNcxwhwJ5qiLThjvDvsg9 XlO/PaS/bd3FnDAQ6lwHrqoLrKwQvKdeIWOpNjOjmzZtBcVdpWvGA35RSPzFB/PgOlKz 7MZg== X-Gm-Message-State: AOAM530VSWVLlR2QimKTSTEywuhbP4+9GEVRHrwboeHbcZt27l2b8PJL DJvIIkXETuFEsNGTTHp3zdo= X-Received: by 2002:a63:f74f:: with SMTP id f15mr3995536pgk.186.1611636382599; Mon, 25 Jan 2021 20:46:22 -0800 (PST) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id e12sm901336pjj.23.2021.01.25.20.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 20:46:21 -0800 (PST) Date: Tue, 26 Jan 2021 13:46:19 +0900 From: Sergey Senozhatsky To: Qais Yousef Cc: Petr Mladek , Sergey Senozhatsky , Thomas Gleixner , Steven Rostedt , John Ogness , "Peter Zijlstra (Intel)" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Fix BUG: Invalid wait context in hrtimer_interrupt() Message-ID: References: <20210123233741.3614408-1-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210123233741.3614408-1-qais.yousef@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/01/23 23:37), Qais Yousef wrote: > > I hit a pr_warn() inside hrtimer_interrupt() which lead to a BUG: Invalid wait > context splat. > > The problem wasn't reproducible but I think the cause is obvious, printk can't > be called from interrupt context. > > AFAICU printk_deferred() is safe from NMI, so I assumed it is safe to be called > from hrtimer_interrupt() too. Adding a pr_warn_once() inside > hrtimer_interrupt() in a location where it is always hit produces the BUG > splat. Replacing it with pr_warn_deferred_once() generates the printk warning > without any splat. Could you please post the lockdep splat? Why is it invalid? Is this... -rt kernel, perhaps? -ss