From patchwork Fri May 24 08:53:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10959363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1CA0112C for ; Fri, 24 May 2019 08:54:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C4DF2884E for ; Fri, 24 May 2019 08:54:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90D652885E; Fri, 24 May 2019 08:54:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 457A128857 for ; Fri, 24 May 2019 08:54:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A62889F08; Fri, 24 May 2019 08:54:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5715C89F08 for ; Fri, 24 May 2019 08:54:03 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id m4so13311603edd.8 for ; Fri, 24 May 2019 01:54:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SbM4kkl5EWVc1Lud+LN0uVoCMIXyfC33Tfm6rZ3mnEI=; b=FOPxhFhgt1cPh0qgva4GP0ek/IOrIJNveK56bJeL+FrI5CdslzJmEh/O8Yju5Ko0P0 GYqOzTvHt5P18SW6jqwsfCZAl1ddWadLvaua6PX+aE8S5JrxmOIDbuQXRiAekQebEk6p zqRa1usRE46ZAWnhibEj3YbvWPr6PCd88k5n29u3e1tAGuxunixWQrJrnBy03hlxlJz4 8tJgDHs1fn/Y/jL2ogmxUPLZ1ryJtNxESuAUfTtfWyVD/G0cT32AHMr4bMoAYJk8MiYh Sj3IwwApRkMsiyHxNqlIJuGcueRKy53rRvK5HuPjtehseicOx6gsi3dQkUj9YgaNia2S Mshw== X-Gm-Message-State: APjAAAVx9+gMmZ4F6GLaq+cMvkPyNZmQifRaYv8TYLi8AMDDR3eba434 QnFYA/APnKly6DjAAYxaaeO7Zw== X-Google-Smtp-Source: APXvYqwCsy7wS1y18TiVxkSUCraHHH/2ZdqufPRJtqnU28F6RF/leE8tdjhD6kmcJQEGce2Dp+lTBA== X-Received: by 2002:a50:b1d1:: with SMTP id n17mr103556301edd.131.1558688042014; Fri, 24 May 2019 01:54:02 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id 96sm567082edq.68.2019.05.24.01.54.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 01:54:01 -0700 (PDT) From: Daniel Vetter To: LKML Subject: [PATCH 01/33] dummycon: Sprinkle locking checks Date: Fri, 24 May 2019 10:53:22 +0200 Message-Id: <20190524085354.27411-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190524085354.27411-1-daniel.vetter@ffwll.ch> References: <20190524085354.27411-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SbM4kkl5EWVc1Lud+LN0uVoCMIXyfC33Tfm6rZ3mnEI=; b=c/FPyF4yrdA+kyY4YOL61v9wViH0qXWsWn7LeQbNFRkgk/NtlJDZd/2fQOm5/hWjBa PLBpGyU8BH+CjKkw/vlnSJ1M9WN303wo9Lz5muTXupETgpDMznUolBtQcGizX4JWfCai ayz2xzztT1E0yJ7VrbMfYeDSWGkMTKBHplZi4= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , Kees Cook , Bartlomiej Zolnierkiewicz , Daniel Vetter , Intel Graphics Development , DRI Development , Hans de Goede , Greg Kroah-Hartman , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP As part of trying to understand the locking (or lack thereof) in the fbcon/vt/fbdev maze, annotate everything. Signed-off-by: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Kees Cook Cc: Nicolas Pitre --- drivers/video/console/dummycon.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 45ad925ad5f8..2352b4c37826 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -33,6 +33,8 @@ static bool dummycon_putc_called; void dummycon_register_output_notifier(struct notifier_block *nb) { + WARN_CONSOLE_UNLOCKED(); + raw_notifier_chain_register(&dummycon_output_nh, nb); if (dummycon_putc_called) @@ -41,11 +43,15 @@ void dummycon_register_output_notifier(struct notifier_block *nb) void dummycon_unregister_output_notifier(struct notifier_block *nb) { + WARN_CONSOLE_UNLOCKED(); + raw_notifier_chain_unregister(&dummycon_output_nh, nb); } static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) { + WARN_CONSOLE_UNLOCKED(); + dummycon_putc_called = true; raw_notifier_call_chain(&dummycon_output_nh, 0, NULL); }