dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Dave Airlie <airlied@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: do lower level device put on unplugged releases
Date: Fri, 15 Mar 2019 15:24:48 +0100	[thread overview]
Message-ID: <ab4f9f08-8718-ef12-8a43-99a5d93104c4@tronnes.org> (raw)
In-Reply-To: <20190315051330.18871-2-airlied@gmail.com>



Den 15.03.2019 06.13, skrev Dave Airlie:
> 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>
> ---

I believe this is fixed already in drm-misc-next:

drm: Fix drm_release() and device unplug
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1ee57d4d75fbc74bb2ae601c8f334219165ef276

Noralf.

>  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);
>  
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-15 14:24 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 ` [PATCH 1/2] drm: do lower level device put on unplugged releases Dave Airlie
2019-03-15 14:24   ` Noralf Trønnes [this message]
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=ab4f9f08-8718-ef12-8a43-99a5d93104c4@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=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).