Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3135647ybi; Thu, 18 Jul 2019 21:43:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXlr20G8Ibd1fGF17rJhYHfE6bGhrMbCz3KqniHofl8ZvVcxHyt10/0rTRdTGtXsYR5h+7 X-Received: by 2002:a65:6294:: with SMTP id f20mr53186080pgv.349.1563511426343; Thu, 18 Jul 2019 21:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511426; cv=none; d=google.com; s=arc-20160816; b=ZiS2E0x7kN0lhs3cUR4T8HIA8cfcf1YKKtGjyOc0G2Jb22hAC1Umqv8B/qd0ImNqK1 By4Yd49iglZJZ/39fBVCyrvh+D+KI8NDKw2E8MMNzouEzp+6TVdD2YCu7P6Ibs7Shzxr Q44ivfgC9uKoPIDrIAUVQQSnhZTQQF95jS3QfETI1D3vAkbOtEaed3JRn1rlAOyFtimM A6kmBWhaapxppCUYSIt+Mv5yt8X7fvqrOG+qDh5+3Rsy/iJUtLSViVtPNtutYFXpr0t1 OGfOrYBZ2GPP+sb/YiaYxqSX/gjMzSh2Pi7yJWnb+5z2jPyA4fEtDkdK35D2TBUwVQzr MzLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9+N8e3N8e7jJO6ZkXge//4ojV6RAGi+dLs4IeZbv2LI=; b=yDD3Xe9T151v/f1rwrz8a6B8BpOx1vuPhJ09Dq52lcHTGnJFXz7cLFMY17TooCDRaD 26fC2zAgtzhFDbhH+KpkK7xJZDb1th8H5gwz+L1IpywLVNVD8dm1YBltLyPHgQ4DYrIe VdnP3m0FgNEH6FCHuoSIdfc+oQMYR0hro1tkPv7q0hQ71J353VHwRR21paUNdHmqxwXy Fm0TTWNCJMqnd/lpMnfWkEml2VGBpCq98tWFEH7JdoLgoDSmomZ9r+ZOUyFGir2vjZjE nKaZYb2h6eyPwxBNO4ry37k1kzpQDt49vW1/ZRZHCiOIfEBeg7BIppKEbJ5yQ+0ehSq5 DH7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YkTqd2El; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si699434pgy.84.2019.07.18.21.43.30; Thu, 18 Jul 2019 21:43:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YkTqd2El; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729813AbfGSElG (ORCPT + 99 others); Fri, 19 Jul 2019 00:41:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:56414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbfGSD5G (ORCPT ); Thu, 18 Jul 2019 23:57:06 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CA1221850; Fri, 19 Jul 2019 03:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508625; bh=NOChr+M9WOR9orhCSmC3TRPJClfJwif6AL58ptimSVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YkTqd2ElFuWeLqHW6VEveWs20pnTPxsyuYcyktLIF0EmLLb9EghRc6c0vRN+pgwcH XgEG2EjWDIpQsIBmUkeEIHnlaraYpOI/+lhxioazyYlpFwrbDl7aCqeCVOZRDIQFDA UBZ3tcohv7VraN3xfAosx20DA+V7R3gdGMZNXJCA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sam Bobroff , Gerd Hoffmann , Sasha Levin , virtualization@lists.linux-foundation.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 009/171] drm/bochs: Fix connector leak during driver unload Date: Thu, 18 Jul 2019 23:54:00 -0400 Message-Id: <20190719035643.14300-9-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sam Bobroff [ Upstream commit 3c6b8625dde82600fd03ad1fcba223f1303ee535 ] When unloading the bochs-drm driver, a warning message is printed by drm_mode_config_cleanup() because a reference is still held to one of the drm_connector structs. Correct this by calling drm_atomic_helper_shutdown() in bochs_pci_remove(). Fixes: 6579c39594ae ("drm/bochs: atomic: switch planes to atomic, wire up helpers.") Signed-off-by: Sam Bobroff Link: http://patchwork.freedesktop.org/patch/msgid/93b363ad62f4938d9ddf3e05b2a61e3f66b2dcd3.1558416473.git.sbobroff@linux.ibm.com Signed-off-by: Gerd Hoffmann Signed-off-by: Sasha Levin --- drivers/gpu/drm/bochs/bochs_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index b86cc705138c..d8b945596b09 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "bochs.h" @@ -171,6 +172,7 @@ static void bochs_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); + drm_atomic_helper_shutdown(dev); drm_dev_unregister(dev); bochs_unload(dev); drm_dev_put(dev); -- 2.20.1