Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp680552yba; Thu, 18 Apr 2019 07:53:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJemZFanVeVSTxrEB5RF2SUuzd8rTDVzml2tMp9pqw7+E75qtCOBcx3ecqs7TOjLyFv1a8 X-Received: by 2002:a17:902:4c:: with SMTP id 70mr6393803pla.328.1555599234823; Thu, 18 Apr 2019 07:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555599234; cv=none; d=google.com; s=arc-20160816; b=Xp8FBIB7U6Agl7f397NnYI1Lb7g9SvcdCWNdboy6TUuqY9BoYjY4W/wkSKgSOpAlol F9dtuNJxNilySW+4MqgAbrUhcVzoGEgMdVxoo/gsCeT4lb0lD8wROXvetIiinWeipybf AvZKN0jOIjj9B9uOyIfCt6Y2gDFekTgY0krnS2bQhxX8cj/scz9SDJDNI3K1NadQmod0 SjcWfEcWbROteb+bmhe07H1KI6S1o5MuwQbIWqaW53qVZdH81ONF9s6oL72jRsy6qAhe fd5uHU1Wq31noQGxTnzhUK8GRnehHR1zNKudPxnFyyF0o0DAaZ1feraAIWS+3rjTRrtu HxkA== 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; bh=5vqbblwo2JMwK3AGIF8VWtV0nW9XVuyEPqGxaXEpJwA=; b=zVT3LmNGjAKNCtqWl3SVZEQL9kh952qgRQh70AqEGdulUNc4iHKvSB5LqUX8VG67sF fl3K5rlxN6Z2dv/xGEbUWb/tvf7O+0b2kgONN2Aqik2B25TMJjE5zpKiFPHXQa8QRSnE lawqIMdozNN01q6H9QhqyVAYN7S6oJ8nodzrbY41P3jya/LcJtQz8PDN69BZ9mqaI5af RqJVWsP/S/WZqLsKAZW63rOqeg8dtI4EskbCTmFLbKL2eZ1r+PTAtiajAtVwtLVWml3A eX/tsbDfwwXl7lf5Dpc4eNy67iART/Cu3wqh3lSHQHu17I2SKsXQLHjDyp0lIQjRRLNg U33w== 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 x14si2049387pgc.328.2019.04.18.07.53.39; Thu, 18 Apr 2019 07:53:54 -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 S2389056AbfDROve (ORCPT + 99 others); Thu, 18 Apr 2019 10:51:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:49619 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733192AbfDROve (ORCPT ); Thu, 18 Apr 2019 10:51:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 07:51:34 -0700 X-IronPort-AV: E=Sophos;i="5.60,366,1549958400"; d="scan'208";a="135450484" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.18]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 07:51:31 -0700 From: Janusz Krzysztofik To: Jani Nikula , Joonas Lahtinen , 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@linux.intel.com, janusz.krzysztofik@intel.com Subject: [PATCH v2 0/1] Stop users from using the device on driver unbind Date: Thu, 18 Apr 2019 16:51:22 +0200 Message-Id: <20190418145123.11085-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190405130235.7707-1-janusz.krzysztofik@linux.intel.com> References: <20190405130235.7707-1-janusz.krzysztofik@linux.intel.com> <155445268803.8259.16095445514284244974@skylake-alporthouse-com> <20190415093225.GZ2665@phenom.ffwll.local> 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. Janusz Krzysztofik (1): drm/i915: Use drm_dev_unplug() drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Since this patch should be now safe for use if merged with current drm-next or drm-tip branch which no longer suffer from incorrectly resolved merge confilct that was breaking it, finally fixed by commit bd53280ef042 ("drm/drv: Fix incorrect resolution of merge conflict"), I'm resending it with Daniel's Reviewed-by: added. Former patch 2/2 has been dropped as it is already in drm-intel-next as commit 141f3767e7b8 ("drm/i915: Mark GEM wedged right after marking device unplugged"). BTW, the wersion I sent was screwed up, not reflecting Chris' intention precisely enough, but Chris was vigilant and fixed it. Sorry Chris. Thanks, Janusz -- 2.20.1