From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Use correct context lock when callig clr_context_registered
Date: Fri, 10 Dec 2021 12:30:01 +0200 [thread overview]
Message-ID: <877dcc3g7q.fsf@intel.com> (raw)
In-Reply-To: <439fb357-cdda-2996-bb63-eaf41a7fe4d1@linux.intel.com>
On Fri, 10 Dec 2021, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> On 09/12/2021 19:14, Daniele Ceraolo Spurio wrote:
>>
>>
>> On 12/9/2021 10:48 AM, Matthew Brost wrote:
>>> s/ce/cn/ when grabbing guc_state.lock before calling
>>> clr_context_registered.
>>>
>>> Fixes: 0f7976506de61 ("drm/i915/guc: Rework and simplify locking")
>>> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>>> Cc: <stable@vger.kernel.org>
>
> I think Cc: stable is not needed here:
>
> $ git tag --contains 0f7976506de61
> drm-intel-fixes-2021-11-18
> drm-intel-gt-next-2021-10-08
> drm-intel-gt-next-2021-10-21
> drm-intel-gt-next-2021-11-22
> drm-intel-next-2021-10-15
> drm-intel-next-fixes-2021-11-09
> v5.16-rc1
> v5.16-rc2
> v5.16-rc3
> v5.16-rc4
'dim fixes 0f7976506de61' concurs.
BR,
Jani.
>
> So still can hit 5.16 via fixes. Rodrigo, did I get this right and you
> will be able to pick it up next week or so?
>
>> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>
>> I'm assuming we didn't see any splat from the lockdep assert in
>> clr_context_registered in our CI runs because we never hit this case as
>> it requires 64k+ contexts. Maybe we can add a selftest to purposely
>> exercise this path? Not a blocker for merging this fix.
>
> Was the bug found by inspection or reported?
>
> Given the buggy function is called steal_guc_id, so if the implication
> is there is no testing for guc id stealing, then it indeed please add
> some coverage ASAP.
>
> Regards,
>
> Tvrtko
>
>>
>> Daniele
>>
>>> ---
>>> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> index 1f9d4fde421f..9b7b4f4e0d91 100644
>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> @@ -1937,9 +1937,9 @@ static int steal_guc_id(struct intel_guc *guc,
>>> struct intel_context *ce)
>>> list_del_init(&cn->guc_id.link);
>>> ce->guc_id = cn->guc_id;
>>> - spin_lock(&ce->guc_state.lock);
>>> + spin_lock(&cn->guc_state.lock);
>>> clr_context_registered(cn);
>>> - spin_unlock(&ce->guc_state.lock);
>>> + spin_unlock(&cn->guc_state.lock);
>>> set_context_guc_id_invalid(cn);
>>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-12-10 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 18:48 [Intel-gfx] [PATCH] drm/i915/guc: Use correct context lock when callig clr_context_registered Matthew Brost
2021-12-09 19:14 ` Daniele Ceraolo Spurio
2021-12-10 8:41 ` Tvrtko Ursulin
2021-12-10 10:30 ` Jani Nikula [this message]
2021-12-10 17:50 ` Matthew Brost
2021-12-10 8:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-10 23:03 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=877dcc3g7q.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.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