From: Nirmoy Das <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
Matthew Brost <matthew.brost@intel.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/xe/xe_sync: initialise ufence.signalled
Date: Fri, 11 Oct 2024 15:43:04 +0200 [thread overview]
Message-ID: <b043c0ae-3778-4fa5-bb63-b8d9c9b4fbf6@intel.com> (raw)
In-Reply-To: <20241011133633.388008-2-matthew.auld@intel.com>
On 10/11/2024 3:36 PM, Matthew Auld wrote:
> We can incorrectly think that the fence has signalled, if we get a
> non-zero value here from the kmalloc, which is quite plausible. Just use
> kzalloc to prevent stuff like this.
>
> Fixes: 977e5b82e090 ("drm/xe: Expose user fence from xe_sync_entry")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> Cc: <stable@vger.kernel.org> # v6.10+
> ---
> drivers/gpu/drm/xe/xe_sync.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index bb3c2a830362..c6cf227ead40 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -58,7 +58,7 @@ static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
> if (!access_ok(ptr, sizeof(*ptr)))
> return ERR_PTR(-EFAULT);
>
> - ufence = kmalloc(sizeof(*ufence), GFP_KERNEL);
> + ufence = kzalloc(sizeof(*ufence), GFP_KERNEL);
> if (!ufence)
> return ERR_PTR(-ENOMEM);
>
next prev parent reply other threads:[~2024-10-11 13:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 13:36 [PATCH] drm/xe/xe_sync: initialise ufence.signalled Matthew Auld
2024-10-11 13:43 ` Nirmoy Das [this message]
2024-10-11 14:45 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-11 14:45 ` ✓ CI.checkpatch: " Patchwork
2024-10-11 14:46 ` ✓ CI.KUnit: " Patchwork
2024-10-11 14:58 ` ✓ CI.Build: " Patchwork
2024-10-11 15:00 ` ✓ CI.Hooks: " Patchwork
2024-10-11 15:02 ` ✓ CI.checksparse: " Patchwork
2024-10-11 15:30 ` ✓ CI.BAT: " Patchwork
2024-10-11 18:37 ` ✗ CI.FULL: failure " Patchwork
2024-10-12 2:08 ` [PATCH] " Matthew Brost
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=b043c0ae-3778-4fa5-bb63-b8d9c9b4fbf6@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mika.kuoppala@linux.intel.com \
--cc=stable@vger.kernel.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