[PATCH 1/2] drm: do lower level device put on unplugged releases
Noralf Trønnes
noralf at tronnes.org
Fri Mar 15 14:24:48 UTC 2019
Den 15.03.2019 06.13, skrev Dave Airlie:
> From: Dave Airlie <airlied at 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 at 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);
>
>
More information about the dri-devel
mailing list