Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp248237yba; Fri, 5 Apr 2019 06:03:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdKZkxpRu5eR9hOJ+kRpoSBxqaUIG84wt5uzPq4squivmj4yxeVMTSZh7TmlHNJr9GRQxm X-Received: by 2002:a17:902:ba88:: with SMTP id k8mr12953568pls.268.1554469429779; Fri, 05 Apr 2019 06:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554469429; cv=none; d=google.com; s=arc-20160816; b=oPeEsV63vmPWtgm6ywwj7Mq+IQVQhbqU0c5vXv56NA/LB8B8SJPfl5f6Rm8XEj8AaJ jFfAvibwAlozzzAxnxWNv+NBADDVznjVMb6qyzkuf44j6LqU9MeWTSlrDSmfCfvGGSUw McewZLCKclBL15DBvxAwLV7JwY4EwS2qPcIQKvCSj1bDickabeuJ4o+sQpjR2hw+Sgyf OeE57WguUSfbS1n2xKS/Uepp33eaV866SlhwLihFdpTmJP5zXOkOcks3T4NMo6m4G9nn kugRPbNA6+wJ0kQaf6sb6wsR7Wk3VU1Pg0TvzyOXfERtko7vulOjWHp0UGSRnKXiMBYH wWvg== 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 :message-id:date:subject:cc:to:from; bh=BwXphTM1heBftGA/yL/b3l5muAwrFpJSVDNnbixuAd8=; b=r3DrrfsF+H2Ac7TTvXeYc5dQhyzLlpT4vut4KAwhUuIJIW8UO4l/ADf6GZchFzxbBx WrUxXs3WVXwvzySjIO78R3SpS70OGEs63MCfdnX5ztt9G0mw0m4EBmPCwxI1+WtxP/6A R2BMmpZYjesZspKXm9r+lW4PGR2AquKJNK9cPrdbpmOGpylDM3sDNxKUl8pHnogGcX3d A7Osd3gjKtoQexppB/UV4oR0/cCkPcUoQcRNwgCIbaCM7qVgTuJRH6GobgpHrcftQHKP WI6ZPUMLwzo1Q6vD3C2O4fewPe4HshZ284EW30/0kiZpLnVrO5bZhBG/bSWflOOOOniY 0M6A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q190si1033386pfc.215.2019.04.05.06.03.31; Fri, 05 Apr 2019 06:03:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729714AbfDENCt (ORCPT + 99 others); Fri, 5 Apr 2019 09:02:49 -0400 Received: from mga02.intel.com ([134.134.136.20]:8642 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbfDENCt (ORCPT ); Fri, 5 Apr 2019 09:02:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 06:02:48 -0700 X-IronPort-AV: E=Sophos;i="5.60,312,1549958400"; d="scan'208";a="148330325" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.18]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 06:02:45 -0700 From: Janusz Krzysztofik To: Joonas Lahtinen , Jani Nikula , Rodrigo Vivi Cc: David Airlie , Daniel Vetter , Chris Wilson , michal.wajdeczko@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: [PATCH 0/2] Stop users from using the device on driver unbind Date: Fri, 5 Apr 2019 15:02:33 +0200 Message-Id: <20190405130235.7707-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use drm_dev_unplug() to have device resources protected from user access by DRM layer as soon as the driver is going to be unbound. Also, cancel all pending work so associated resources can be quickly released. Janusz Krzysztofik (2): drm/i915: Use drm_dev_unplug() drm/i915: Mark GEM wedged right after marking device unplugged drivers/gpu/drm/i915/i915_drv.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) I'm resending these two patches together in series to make the robot happy about the second one. Also, I've added the Suggested-by: clause to credit actual Chris' contribution. Thanks, Janusz -- 2.20.1