Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp822996pxb; Tue, 3 Nov 2020 13:33:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJylA5iBBCU51KBhimFotunKY5rsmhfxBlI5RvuuD+J5qBHSOUyL9nK1UCydP6bkA4UJ3oUR X-Received: by 2002:a17:906:1183:: with SMTP id n3mr21631486eja.188.1604439191337; Tue, 03 Nov 2020 13:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439191; cv=none; d=google.com; s=arc-20160816; b=YmpHiNhzTtfyX+6biigT6ps1JAQgxWFhLIw1bpDHGxPjlV7V8ZDF92Cr4SmxsRVz5N z444ZFOiB0lIeZEU+zjjx6IZNjjzeUwRSxZdgxW7q32VdX/lkdFUxXGZucxVAebS99dW 2z6VfGcjK00Hap6FdbP/7owaKd35SBWr8Addc9JUrDwlOtA1EPH9TfD/erPRd14qyzKP 87/zP8RJHqrA/7gKJeSLZw3PbUxYFk3+MANU7MWWGTUelMmRZkEr4mOd8stHGZWTSsOA ZxwMEVabFBO1G0YMtOIGuM/dBsMdyhHHxNycrtmCW7uTAxWaQ+Tnw4qiN/0wsAvDlHZC yTbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=21dDzJk1pG0KOBRyHwAQY7vCskGdeJCY90HU/H56064=; b=ZT61dx932hFWS69bpNGU6I6Ms9oXXz/tMjNSJoxi7NS2jAE4WyGD0nBRrV+LJpH4jN RyMiow/dM/BuOSBRgBK/UEkoBZufs0rgieCyos0tM6uT8Hf25zeanGvDmYx8Kz91OXSo Bk1jVV+8rnAEYOE+ZfHTVa/2P3w+94xF9fKk79Dir4JsBgXSx8brtr5VAmf328+K5Iur YYNba9IoT6byBgHI9RJnoZ5oebiv0UBIpqXh2Rz3au+PukU2d7am4iG37ddrVgG6k0iJ w7zFQ73R52kmuMidgboxxfmmtMYA3JLCCVtd6KZUgrljYqsXeFt6TQNr1+UUbApGMTYv EsuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1O2gnMlX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si20306eja.14.2020.11.03.13.32.48; Tue, 03 Nov 2020 13:33:11 -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=@kernel.org header.s=default header.b=1O2gnMlX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733263AbgKCV2W (ORCPT + 99 others); Tue, 3 Nov 2020 16:28:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:35332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732037AbgKCU7z (ORCPT ); Tue, 3 Nov 2020 15:59:55 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 662C92053B; Tue, 3 Nov 2020 20:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437194; bh=qx8wmItmrAlQijpvsRCgppHxF7uMHZ+9OEQSeHwfz7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1O2gnMlXzrf5CRMTS91T4ztK9Lm8thXak8Y0flS+yaJSjrGjw/9J6N8GdE5yT9W0W IoZE064w34cftelEyBGVsFsTSja/eubIeeoh+vAp8ujq4orHYgpbCrOtPM5SUmIIuu 8NvyOBamiNWKGYeGzbDftWyVe9XWy0oKkzHLIKr8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Deucher , Nicholas Kazlauskas , Takashi Iwai Subject: [PATCH 5.4 186/214] drm/amd/display: Fix kernel panic by dal_gpio_open() error Date: Tue, 3 Nov 2020 21:37:14 +0100 Message-Id: <20201103203308.136848156@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 920bb38c518408fa2600eaefa0af9e82cf48f166 upstream. Currently both error code paths handled in dal_gpio_open_ex() issues ASSERT_CRITICAL(), and this leads to a kernel panic unnecessarily if CONFIG_KGDB is enabled. Since basically both are non-critical errors and can be recovered, drop those assert calls and use a safer one, BREAK_TO_DEBUGGER(), for allowing the debugging, instead. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c @@ -63,13 +63,13 @@ enum gpio_result dal_gpio_open_ex( enum gpio_mode mode) { if (gpio->pin) { - ASSERT_CRITICAL(false); + BREAK_TO_DEBUGGER(); return GPIO_RESULT_ALREADY_OPENED; } // No action if allocation failed during gpio construct if (!gpio->hw_container.ddc) { - ASSERT_CRITICAL(false); + BREAK_TO_DEBUGGER(); return GPIO_RESULT_NON_SPECIFIC_ERROR; } gpio->mode = mode;