Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp307694ybc; Tue, 12 Nov 2019 01:41:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyRKAk2VZzoqwte6oZf/QSHf8oTwItvROzKG7YoISaJUzqPmlw+EF1chBJ6lmAfCdjhu498 X-Received: by 2002:aa7:cb53:: with SMTP id w19mr31762809edt.50.1573551719254; Tue, 12 Nov 2019 01:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573551719; cv=none; d=google.com; s=arc-20160816; b=IW5ZhuvDTmD68gtKBmDt91bGfrOKpsI79A2QLXXuqK6/vweftSYlEZ6Bv2+W3GLNWG IF6D3JQ9dU76NE/Tzg2lnPRs5+0IMm72OoSNqqG0W3gx3M7NbaLV6dUThh74WV/YX77D IUxwnK4ItoPyASRdP3lkZp+nklTWQ3fqfPrz26zREJvyD22zp3mJRbmgIePU5QkLV8ww pNEn6eNdl4PwOHfplM7E/ormz54d9u1ydQKRgYlFbh/LhUrctbUGwdb2C3ph1ZjCM+c1 7rNJMcDsMX/jUaFUHtYJclWUHut1e3+u30UTDXtP9+nv/txsioIWwSE5mBh95rHc+DVG cMNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ejx/kqQy3kcUiiFlaD/FPSSHJrxrW00iUrEoU2xAx90=; b=dVUR7dEvvRq1LZpK311lqqWEPxrawjwvW0a7kcN8fCWmvVQHwg2Q0tnda4wbkENDt7 bSoEj/gDGFk8gLApuvy53q2iqvDKyZNB28YEtm3wA+Ab2j+5pQS49LHdTEG9ktUUR4K5 A2OiEGg4sR7GpJn1HbMVRU4qdJFPXgOCJNFH9R0SC/M/hnk7TtBmAVEcL6m7YoW6w7Qa fT1SKerQe/EINUAMHer9fAG6egFAfvoXHQxNpWn7BO4P+MFCUMZ28S01+4I72638RaV1 ObJQo6Ve6YDcdwg6dzoym4bFYK7DdWEm4Ev061Jv5g40CixvNvvy80S9CogdV+IEngJZ Oo7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=lWbjKPSh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si11036176ejr.10.2019.11.12.01.41.34; Tue, 12 Nov 2019 01:41:59 -0800 (PST) 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=fail header.i=@ffwll.ch header.s=google header.b=lWbjKPSh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727222AbfKLJkg (ORCPT + 99 others); Tue, 12 Nov 2019 04:40:36 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34843 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfKLJkf (ORCPT ); Tue, 12 Nov 2019 04:40:35 -0500 Received: by mail-wm1-f66.google.com with SMTP id 8so2193081wmo.0 for ; Tue, 12 Nov 2019 01:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ejx/kqQy3kcUiiFlaD/FPSSHJrxrW00iUrEoU2xAx90=; b=lWbjKPSh3T/bDqJI/OHcdLlHvZS5ZQztXcO2OXBpY5i56aD1VdfCigUlZJ3ECo8PkX c5BD6/OUUkowHGZ0krgx5x2QCrVgAaZYg8lbDU4ZKdFofGst8i6HqOXyIbBwSmdeZoYl d1iLL7m24zo7aI/7PXf4CBZRYc/omP54nwyD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=ejx/kqQy3kcUiiFlaD/FPSSHJrxrW00iUrEoU2xAx90=; b=b55TcwaInlwXGsEyzynwgjApgv6dPar35QVf3BPllaMlW3HGUuHbZfTmTyWyZna7TR P72/rV4mZMIkntbCwb2TSpGJTFR8sY6FLxLiQnJFw4hhghLWwiwC2GUnJA7Aqm/lP1Xv HCR38BGjUbXT88KzX1pgYG3DoNPwWqZF7/XsZaN8E14xymapihhpXe5+Rd+Hlzwnsu0t Ppi6wTXBG1lAAIiQD2ngfuW8lK97yk3tLdRE3gcRJODtlmZsk8lGbfcfO89WHTgnPYjG r7dkNdchMBZEdUzoPUb2UD3At237hTSOF7PtNKIOHSIhneGrG93+HNrvWaK7qr7WX/SS SMlQ== X-Gm-Message-State: APjAAAXOSRqIXCDM4B4IYGlGMBVLs4aQiK0L6Kn1NhPHc4zk6K7ShIJu QEN/5eqR3TqWbarXqVWIDMO7/g== X-Received: by 2002:a1c:c28a:: with SMTP id s132mr2985572wmf.162.1573551633503; Tue, 12 Nov 2019 01:40:33 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id 62sm26900378wre.38.2019.11.12.01.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 01:40:32 -0800 (PST) Date: Tue, 12 Nov 2019 10:40:31 +0100 From: Daniel Vetter To: Chuhong Yuan Cc: David Airlie , Gerd Hoffmann , Daniel Vetter , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/virtgpu: fix double unregistration Message-ID: <20191112094031.GF23790@phenom.ffwll.local> Mail-Followup-To: Chuhong Yuan , David Airlie , Gerd Hoffmann , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20191109075417.29808-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191109075417.29808-1-hslester96@gmail.com> X-Operating-System: Linux phenom 5.2.0-3-amd64 User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 09, 2019 at 03:54:17PM +0800, Chuhong Yuan wrote: > drm_put_dev also calls drm_dev_unregister, so dev will be unregistered > twice. > Replace it with drm_dev_put to fix it. > > Signed-off-by: Chuhong Yuan Nice catch, I'll apply. Since this is so confusing, we actually have a todo to remove drm_put_dev completely from the codebase (and open-code it with explicit unregister+put). Want to do that little patch series to update the remaining few drivers and then remove drm_put_dev from core code? Thanks, Daniel > --- > drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c > index 0fc32fa0b3c0..fccc24e21af8 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_drv.c > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c > @@ -138,7 +138,7 @@ static void virtio_gpu_remove(struct virtio_device *vdev) > > drm_dev_unregister(dev); > virtio_gpu_deinit(dev); > - drm_put_dev(dev); > + drm_dev_put(dev); > } > > static void virtio_gpu_config_changed(struct virtio_device *vdev) > -- > 2.23.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch