From patchwork Mon May 20 08:21:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10950349 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 81E35912 for ; Mon, 20 May 2019 08:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7488228698 for ; Mon, 20 May 2019 08:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 682722873B; Mon, 20 May 2019 08:22:32 +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 1CB39286B2 for ; Mon, 20 May 2019 08:22:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE89C8925D; Mon, 20 May 2019 08:22:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A25B89255 for ; Mon, 20 May 2019 08:22:25 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id w11so22519380edl.5 for ; Mon, 20 May 2019 01:22:25 -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=Jnyv7SD758KplV1AamRgLFDkLa85ctrpLIDOc64FA6AdGZYdSC1doM3n8npN5hdA+y 3j8iwPuMdqG6YtOE6jMOKciyMJSKI3L5xjPkV9f36T59kmL23OfpB9CWcrlA3Hoh2KUS CKYtX7lYOueEEGCGinfh9leDMu/YP1wpvukwQij7/i+TUPu1t3bJsODvAKAS6Qzw/g7z GQPuKfya+P98psvDRy4G9YcpWhNML+BLDmbea6zi1+cDXr+Bn03fHm4UyPqvVZh3GXxx MfFNJ9gjQ7zLnkqQ0f04HHjsFx/Oe0gjNmuCVstKlkpvzcw5x03KVRGXpjTIwxOuAmHT glpg== X-Gm-Message-State: APjAAAU/IDj/esu0xD4a1Be9zC3+q87t080EPSu+LBU/WCovGaQ/CNW6 NDSJAQfZsEAPVRYXgww5SL2WV/Xjwwk= X-Google-Smtp-Source: APXvYqxqPql4lZWwJLVOFFGLuWmPeQWFMGasN2gXQcRCWWC75MWt4Ank1BJS5Y0nm96pOu/UVBpZqQ== X-Received: by 2002:a17:906:e0c5:: with SMTP id gl5mr57097610ejb.212.1558340543985; Mon, 20 May 2019 01:22:23 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id t25sm3021263ejx.8.2019.05.20.01.22.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 01:22:23 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 01/33] dummycon: Sprinkle locking checks Date: Mon, 20 May 2019 10:21:44 +0200 Message-Id: <20190520082216.26273-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520082216.26273-1-daniel.vetter@ffwll.ch> References: <20190520082216.26273-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=SW60b7nIdATIPrwIWT9oaGpKEoAZHbdQlROc0UqUsAS10sCqELdn+dY7HDkmX5YTds yZ5phBYpFJyDH5V9PQPmkhmxB7CtZmaxADWsHNnsI9mYQppWf25NMEL5tGf9F4QVcodj 8X4ejWbghPqnUvuMd2Uq38ikh4YOZRHHgb8IY= 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 , LKML , 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); }