All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Keith Packard <keithp@keithp.com>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/7] drm/leases: Drop object_id validation for negative ids
Date: Thu, 14 Mar 2019 08:54:24 +0100	[thread overview]
Message-ID: <20190314085424.50a41a55@collabora.com> (raw)
In-Reply-To: <20190228144910.26488-2-daniel.vetter@ffwll.ch>

On Thu, 28 Feb 2019 15:49:04 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> Not exactly sure what's the aim here, but the canonical nil object has
> id == 0, we don't use negative object ids for anything. Plus all
> object_id are valided by the object_idr, there's nothing we need to do
> on top of that ENOENT check a bit further down.
> 
> Spotted while typing exhaustive igt coverage for all these
> corner-cases.
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

> ---
>  drivers/gpu/drm/drm_lease.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
> index 603b0bd9c5ce..1176d814cf7f 100644
> --- a/drivers/gpu/drm/drm_lease.c
> +++ b/drivers/gpu/drm/drm_lease.c
> @@ -403,11 +403,6 @@ static int fill_object_idr(struct drm_device *dev,
>  	/* step one - get references to all the mode objects
>  	   and check for validity. */
>  	for (o = 0; o < object_count; o++) {
> -		if ((int) object_ids[o] < 0) {
> -			ret = -EINVAL;
> -			goto out_free_objects;
> -		}
> -
>  		objects[o] = drm_mode_object_find(dev, lessor_priv,
>  						  object_ids[o],
>  						  DRM_MODE_OBJECT_ANY);

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

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Keith Packard <keithp@keithp.com>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH 1/7] drm/leases: Drop object_id validation for negative ids
Date: Thu, 14 Mar 2019 08:54:24 +0100	[thread overview]
Message-ID: <20190314085424.50a41a55@collabora.com> (raw)
In-Reply-To: <20190228144910.26488-2-daniel.vetter@ffwll.ch>

On Thu, 28 Feb 2019 15:49:04 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> Not exactly sure what's the aim here, but the canonical nil object has
> id == 0, we don't use negative object ids for anything. Plus all
> object_id are valided by the object_idr, there's nothing we need to do
> on top of that ENOENT check a bit further down.
> 
> Spotted while typing exhaustive igt coverage for all these
> corner-cases.
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

> ---
>  drivers/gpu/drm/drm_lease.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
> index 603b0bd9c5ce..1176d814cf7f 100644
> --- a/drivers/gpu/drm/drm_lease.c
> +++ b/drivers/gpu/drm/drm_lease.c
> @@ -403,11 +403,6 @@ static int fill_object_idr(struct drm_device *dev,
>  	/* step one - get references to all the mode objects
>  	   and check for validity. */
>  	for (o = 0; o < object_count; o++) {
> -		if ((int) object_ids[o] < 0) {
> -			ret = -EINVAL;
> -			goto out_free_objects;
> -		}
> -
>  		objects[o] = drm_mode_object_find(dev, lessor_priv,
>  						  object_ids[o],
>  						  DRM_MODE_OBJECT_ANY);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-14  7:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 14:49 [PATCH 0/7] some cleanups and uapi clarification for leases Daniel Vetter
2019-02-28 14:49 ` [igt-dev] " Daniel Vetter
2019-02-28 14:49 ` [PATCH 1/7] drm/leases: Drop object_id validation for negative ids Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-14  7:54   ` Boris Brezillon [this message]
2019-03-14  7:54     ` Boris Brezillon
2019-03-29  4:46     ` Dave Airlie
2019-03-29  4:46       ` [igt-dev] " Dave Airlie
2019-03-29  8:28       ` Daniel Vetter
2019-03-29  8:28         ` [igt-dev] " Daniel Vetter
2019-02-28 14:49 ` [PATCH 2/7] drm/lease: Drop recursive leads checks Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-14  8:44   ` Boris Brezillon
2019-03-14  8:44     ` [igt-dev] " Boris Brezillon
2019-02-28 14:49 ` [PATCH 3/7] drm/leases: Don't init to 0 in drm_master_create Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-14  7:56   ` Boris Brezillon
2019-03-14  7:56     ` [igt-dev] " Boris Brezillon
2019-03-29  4:47     ` Dave Airlie
2019-03-29  4:47       ` [igt-dev] " Dave Airlie
2019-02-28 14:49 ` [PATCH 4/7] drm/lease: Check for lessor outside of locks Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-14  8:07   ` Boris Brezillon
2019-03-14  8:07     ` [igt-dev] " Boris Brezillon
2019-04-03  1:33     ` Dave Airlie
2019-04-03  1:33       ` [igt-dev] " Dave Airlie
2019-04-03  7:04     ` Daniel Vetter
2019-04-03  7:04       ` [igt-dev] " Daniel Vetter
2019-04-03  7:50       ` Boris Brezillon
2019-04-03  7:50         ` [igt-dev] " Boris Brezillon
2019-02-28 14:49 ` [PATCH 5/7] drm/lease: Make sure implicit planes are leased Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-05 13:35   ` Sasha Levin
2019-03-05 13:35     ` Sasha Levin
2019-02-28 14:49 ` [PATCH 6/7] drm/atomic: Wire file_priv through for property changes Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-02-28 14:49 ` [PATCH 7/7] drm/atomic: -EACCESS for lease-denied crtc lookup Daniel Vetter
2019-02-28 14:49   ` [igt-dev] " Daniel Vetter
2019-03-14  8:58 ` [PATCH 0/7] some cleanups and uapi clarification for leases Boris Brezillon
2019-03-14  8:58   ` [igt-dev] " Boris Brezillon
2019-04-05  2:40   ` Dave Airlie
2019-04-05  2:40     ` [igt-dev] " Dave Airlie
2019-04-24  9:31     ` Daniel Vetter
2019-04-24  9:31       ` [igt-dev] " Daniel Vetter
2019-02-28 17:00 Daniel Vetter
2019-02-28 17:00 ` [PATCH 1/7] drm/leases: Drop object_id validation for negative ids Daniel Vetter

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=20190314085424.50a41a55@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.