From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: validate client of BO inside lock
Date: Wed, 5 Jun 2024 12:11:09 +0530 [thread overview]
Message-ID: <f900e005-1ea4-4896-a51f-72f069612eb6@intel.com> (raw)
In-Reply-To: <20240603142823.720213-1-tejas.upadhyay@intel.com>
On 03-06-2024 19:58, Tejas Upadhyay wrote:
> As client of BO getting referenced inside lock of BOs
> list, its good practice to move these WARN_ONs also
> under same lock to validate existance of bo->client.
Nit: Use Imperative language.
%s/existance/existence
With these addressed:
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
> ---
> drivers/gpu/drm/xe/xe_drm_client.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
> index 4a19b771e3a0..7881b02fa117 100644
> --- a/drivers/gpu/drm/xe/xe_drm_client.c
> +++ b/drivers/gpu/drm/xe/xe_drm_client.c
> @@ -131,10 +131,9 @@ void __xe_drm_client_free(struct kref *kref)
> void xe_drm_client_add_bo(struct xe_drm_client *client,
> struct xe_bo *bo)
> {
> + spin_lock(&client->bos_lock);
> XE_WARN_ON(bo->client);
> XE_WARN_ON(!list_empty(&bo->client_link));
> -
> - spin_lock(&client->bos_lock);
> bo->client = xe_drm_client_get(client);
> list_add_tail(&bo->client_link, &client->bos_list);
> spin_unlock(&client->bos_lock);
next prev parent reply other threads:[~2024-06-05 6:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 14:28 [PATCH] drm/xe: validate client of BO inside lock Tejas Upadhyay
2024-06-04 17:32 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-04 17:33 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-04 17:35 ` ✓ CI.KUnit: success " Patchwork
2024-06-04 17:49 ` ✓ CI.Build: " Patchwork
2024-06-04 17:49 ` ✗ CI.Hooks: failure " Patchwork
2024-06-04 17:50 ` ✓ CI.checksparse: success " Patchwork
2024-06-04 18:30 ` ✓ CI.BAT: " Patchwork
2024-06-04 22:58 ` ✗ CI.FULL: failure " Patchwork
2024-06-05 6:41 ` Ghimiray, Himal Prasad [this message]
2024-06-05 7:29 ` [PATCH] " Ghimiray, Himal Prasad
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=f900e005-1ea4-4896-a51f-72f069612eb6@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=tejas.upadhyay@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox