Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp579863pxb; Tue, 15 Feb 2022 22:45:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk/7sfMnJMoR6UOOmNExppOPgquF1J7LBuBbh5mmG9cQ5Oxn3XpUjTGi1VzTLy6gDDm9h2 X-Received: by 2002:a17:902:bb8f:b0:14e:f2f5:8e9 with SMTP id m15-20020a170902bb8f00b0014ef2f508e9mr1330344pls.24.1644993901201; Tue, 15 Feb 2022 22:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644993901; cv=none; d=google.com; s=arc-20160816; b=Z0MNtEEh8/84DFDVwKwUqyisTEeF5hZi2zaalIfTVDmXjqfaKmgSayFJhNZOgJZvIW fhXp5vbMT/z7JMO4vz19ASKxX+0jTQPNpqpOxwB45AtqI2YeVUID06xFi7UlJuAqklTx YqibCqbGHNd4hYTfioIGsNmFATfknbDDJrSfB5WdG/tZ/B2JpfKICecb6FjNJJNvjB04 OHZBgLz3Q1WmnBvzpAaWtKZWAPz3qfUy0IhElUqTAGI6hsEF4oLqpGQX1bsC4P3hVy6N gPJ00PYahnx3jUpJxK7O7FYM9XV5CeI7QFgb3y1z2+ZXe/B18QU/N7U06pILl7oTgszl mXjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=/92fvJXUZ4UlcGnO+/q6TqsnzVjGJ8oxjr48t90Uurg=; b=ZvwSZzI3VrLw1nOwNRt5eicNYBmhf3bR4fT4UvWYGL5/n6rd8WNj9/zh51Bi9iD4te g5hG9Wub99QlvJ9pdpV8LDrhTDSQcJKnsfGf/4abSeISlGq7oxsgUPVMKj00/SUNhqRh mrreLvaw6esRJ/+5183HxMF2j5X0xli521DG+FS+F8zkfbdEy8lMj6CBxTs15g7qfXRa LoD/uUKHPrO0nvIxT8faQ0gC2RrKDMk7k6mWSEJaEdgntQNtl9yeylpFogGKm6er9BOi 3YvV2zqeki1ev5gB1v+x8U02JJzpw3W/hpTePlaPG4aFmJNsNfzJ0X6qRrIWm6UvVVd/ k0+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NJOUXAOk; 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=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k17si16539241pls.371.2022.02.15.22.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:45:01 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=NJOUXAOk; 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=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 014C5205D1; Tue, 15 Feb 2022 22:31:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242556AbiBOT7t (ORCPT + 99 others); Tue, 15 Feb 2022 14:59:49 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240057AbiBOT7r (ORCPT ); Tue, 15 Feb 2022 14:59:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0813566227 for ; Tue, 15 Feb 2022 11:59:32 -0800 (PST) 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 A7C45B81CCB for ; Tue, 15 Feb 2022 19:59:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7990DC340EB; Tue, 15 Feb 2022 19:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644955169; bh=SDqM7j7mEfwIY0ZRiphWLUUJe87XSwuNN2c+pVrVzVI=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=NJOUXAOkkVz53MA8gXUhWtMSW4jQgL2EsGf+Td5qutjO6kBYfKCTEFIjG/oS4pEGX /voy7GGUWUVWfWGdw8oAjTRvaU3ai27E8iEDhNRLKt24pabx47oyirtPrsPTpM3ufq zIbU7BEI75akuIN3k4JYPJIT5Rj6KuDh7jEEPZLTAgMdnvpmdV3aM6iKTLQ9b08T7c T829I+35D8DUvO0TnXEna1qImNt5ZKeWs5rSoBZUiJ/z6m+AyYP20id/dKVfH8fXmd BmoycJTvmJLE+QZa+3P+ip4xC6P4FlA39gIE8zm+SDrNpFcmP7yWT9pUgzut0wuVFS uYWQBQVg2GUQA== Date: Tue, 15 Feb 2022 20:59:24 +0100 (CET) From: Jiri Kosina To: John Ogness cc: Sebastian Siewior , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: fb-helper: Avoid nesting spinlock_t into raw_spinlock_t In-Reply-To: <87o8382j5s.fsf@jogness.linutronix.de> Message-ID: References: <87o8382j5s.fsf@jogness.linutronix.de> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Tue, 15 Feb 2022, John Ogness wrote: > >> drm_fb_helper_damage() is acquiring spinlock_t (helper->damage_lock), > >> while it can be called from contexts where raw_spinlock_t is held (e.g. > >> console_owner lock obtained on vprintk_emit() codepath). > >> > >> As the critical sections protected by damage_lock are super-tiny, let's > >> fix this by converting it to raw_spinlock_t in order not to violate > >> PREEMPT_RT-imposed lock nesting rules. > >> > >> This fixes the splat below. > >> > >> ============================= > >> [ BUG: Invalid wait context ] > >> 5.17.0-rc4-00002-gd567f5db412e #1 Not tainted > > > > rc4. Is this also the case in the RT tree which includes John's printk > > changes? > > In the RT tree, the fbcon's write() callback is only called in > preemptible() contexts. So this is only a mainline issue. > > The series I recently posted to LKML [0] should also address this issue > (if/when it gets accepted). > > John > > [0] https://lore.kernel.org/lkml/20220207194323.273637-1-john.ogness@linutronix.de Thanks for confirmation, seems like this problem is indeed cured by your series. I still believe though that we shouldn't let 5.17 released with this warning being emitted into dmesg, so I'd suggest going with my patch for mainline, and revert it in your series on top of it. Thanks, -- Jiri Kosina SUSE Labs