diff options
| author | Keith Packard <[email protected]> | 2017-04-10 04:35:34 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2017-10-25 06:31:30 +0000 |
| commit | 7de440db20d4531e4b740bf17b56afc426c54377 (patch) | |
| tree | f260b946f2d43023266e721903b99f523c2a944d /drivers/gpu/drm/drm_auth.c | |
| parent | drm: Add drm_object lease infrastructure [v5] (diff) | |
| download | kernel-7de440db20d4531e4b740bf17b56afc426c54377.tar.gz kernel-7de440db20d4531e4b740bf17b56afc426c54377.zip | |
drm: Check mode object lease status in all master ioctl paths [v4]
Attempts to modify un-leased objects are rejected with an error.
Information returned about unleased objects is modified to make them
appear unusable and/or disconnected.
Changes for v2 as suggested by Daniel Vetter <[email protected]>:
* With the change in the __drm_mode_object_find API to pass the
file_priv along, we can now centralize most of the lease-based
access checks in that function.
* A few places skip that API and require in-line checks.
Changes for v3 provided by Dave Airlie <[email protected]>
* remove support for leasing encoders.
* add support for leasing planes.
Changes for v4
* Only call drm_lease_held if DRIVER_MODESET.
Signed-off-by: Keith Packard <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/drm_auth.c')
| -rw-r--r-- | drivers/gpu/drm/drm_auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 4f0e274f4111..aad468d170a7 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -310,7 +310,7 @@ out: */ bool drm_is_current_master(struct drm_file *fpriv) { - return fpriv->is_master && fpriv->master == fpriv->minor->dev->master; + return fpriv->is_master && drm_lease_owner(fpriv->master) == fpriv->minor->dev->master; } EXPORT_SYMBOL(drm_is_current_master); |
