dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 1/2] drm: do lower level device put on unplugged releases
Date: Fri, 15 Mar 2019 15:13:29 +1000	[thread overview]
Message-ID: <20190315051330.18871-2-airlied@gmail.com> (raw)
In-Reply-To: <20190315051330.18871-1-airlied@gmail.com>

From: Dave Airlie <airlied@redhat.com>

When we release the file handle on a device that has been unplugged
it has already called the unregister path, which doesn't like being
called again. We should just do the dev put version instead.

This fixes some crashes unplugged in a udl device.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index 83a5bbca6e7e..900fe8228745 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -492,7 +492,7 @@ int drm_release(struct inode *inode, struct file *filp)
 	if (!--dev->open_count) {
 		drm_lastclose(dev);
 		if (drm_dev_is_unplugged(dev))
-			drm_put_dev(dev);
+			drm_dev_put(dev);
 	}
 	mutex_unlock(&drm_global_mutex);
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-15  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15  5:13 udl unplug fixes Dave Airlie
2019-03-15  5:13 ` Dave Airlie [this message]
2019-03-15 14:24   ` [PATCH 1/2] drm: do lower level device put on unplugged releases Noralf Trønnes
2019-03-15  5:13 ` [PATCH 2/2] drm/udl: add a release method and delay modeset teardown Dave Airlie
2019-03-15 11:02   ` Daniel Vetter
2019-03-15 14:34   ` Noralf Trønnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190315051330.18871-2-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).