From patchwork Thu May 2 07:43:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2510401 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 62220DF215 for ; Thu, 2 May 2013 07:40:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68A5FE6338 for ; Thu, 2 May 2013 00:40:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A2DFE5C82 for ; Thu, 2 May 2013 00:40:06 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u3so228425wey.36 for ; Thu, 02 May 2013 00:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=bolaNdWZ1aJCWWxWoa4OxnXIszUQNmzwHZXSBtBPgKE=; b=bQ6fNZmNuvJESyz1qf/cjnd7Fa4AJXPIXIPEBI723wTcAXLreUW+vXYt9PCsTIBG4Z 6q5gT/py+/97NTN4ElhHoG9+FExvy4z7Tl/Ggplkbrl4fAGI0NLh++SYQqIjXO9Qyq+F ShUiTl+bBN15psi4UpInoDenW7ayM9GAsEEJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=bolaNdWZ1aJCWWxWoa4OxnXIszUQNmzwHZXSBtBPgKE=; b=PcWtHN15hQo22CAgLxV3lE3qEoq5UKxY00wISFkNtdZA+9LNY+TI4FEyCELc/wWpJU ZovblDKhg4/OazJCvBWgW1csKeG/Z6u3jEio1JP0EsnH6xp2t0WLrTY+sfnDcJKHB5RY 40pJDWwFj/rhtKLYGY3oa2Fo02wYRzw2yOZxqcTL6+cT8zfej9D7z4FBvIFgR2RD9je9 o1+cOqjzBvTzesaDFFwe/TKhEFBLEWqu9Op/BfByUR60dickHcszv6wDIoHfGtaCtDmS UXWczfOKu2eWLrKpRnOnkR8WCxiv0c5Am8j3oZD7ebfi5dC0dC423wWkSNRWmUlXbOFf TQKg== X-Received: by 10.180.108.176 with SMTP id hl16mr5928360wib.25.1367480404904; Thu, 02 May 2013 00:40:04 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id fz3sm8657006wib.0.2013.05.02.00.40.03 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 00:40:04 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm: don't check modeset locks in panic handler Date: Thu, 2 May 2013 09:43:05 +0200 Message-Id: <1367480585-22814-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-Gm-Message-State: ALoCoQnD33gvMWxZP8PBy20GFb+quSDmzAg04/We/KzbUBzUWlT+FsjcCi7xyyeuTG8CLI0HsvPB Cc: Borislav Petkov , Daniel Vetter , LKML , stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Since we know that locking is broken in that case and it's more important to not flood the dmesg with random gunk. Cc: Dave Airlie Cc: Borislav Petkov References: https://groups.google.com/forum/?fromgroups=#!topic/linux.kernel/QFzFxSUeV4I Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_crtc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 792c3e3..3be0802 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -78,6 +78,10 @@ void drm_warn_on_modeset_not_all_locked(struct drm_device *dev) { struct drm_crtc *crtc; + /* Locking is currently fubar in the panic handler. */ + if (oops_in_progress) + return; + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) WARN_ON(!mutex_is_locked(&crtc->mutex));