[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210811072843.GC10829@duo.ucw.cz>
Date: Wed, 11 Aug 2021 09:28:43 +0200
From: Pavel Machek <pavel@...x.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
jason@...kstrand.net, Jonathan Gray <jsg@....id.au>
Subject: Re: [PATCH 5.10 125/135] drm/i915: avoid uninitialised var in
eb_parse()
Hi!
> From: Jonathan Gray <jsg@....id.au>
>
> The backport of c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 to 5.10 in
> 6976f3cf34a1a8b791c048bbaa411ebfe48666b1 removed more than it should
> have leading to 'batch' being used uninitialised. The 5.13 backport and
> the mainline commit did not remove the portion this patch adds back.
This patch has no upstream equivalent, right?
Which is okay -- it explains it in plain english, but it shows that
scripts should not simply search for anything that looks like SHA and
treat it as upsteam commit it.
So let me re-iterate need for consistent marking of upstream commits.
So far this works reasonably well, but selecting one format and
sticking to it would be even better.
ma = re.match(".*Upstream commit ([0-9a-f]*) .*", l)
if ma:
m.upstream = ma.group(1)
ma = re.match("[Cc]ommit ([0-9a-f]*) upstream[.]*", l)
if ma:
m.upstream = ma.group(1)
ma = re.match("[Cc]ommit: ([0-9a-f]*)", l)
if ma:
m.upstream = ma.group(1)
Thanks and best regards,
Pavel
> Signed-off-by: Jonathan Gray <jsg@....id.au>
> Fixes: 6976f3cf34a1 ("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"")
> Cc: <stable@...r.kernel.org> # 5.10
> Cc: Jason Ekstrand <jason@...kstrand.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -2351,6 +2351,12 @@ static int eb_parse(struct i915_execbuff
> eb->batch_flags |= I915_DISPATCH_SECURE;
> }
>
> + batch = eb_dispatch_secure(eb, shadow);
> + if (IS_ERR(batch)) {
> + err = PTR_ERR(batch);
> + goto err_trampoline;
> + }
> +
> err = intel_engine_cmd_parser(eb->engine,
> eb->batch->vma,
> eb->batch_start_offset,
> @@ -2377,6 +2383,7 @@ secure_batch:
> err_unpin_batch:
> if (batch)
> i915_vma_unpin(batch);
> +err_trampoline:
> if (trampoline)
> i915_vma_unpin(trampoline);
> err_shadow:
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists