From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Andi Shyti <andi.shyti@kernel.org>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <andi.shyti@linux.intel.com>,
<krzysztof.karas@intel.com>, <krzysztof.niemiec@intel.com>,
<chris.p.wilson@intel.com>
Subject: Re: [PATCH] drm/i915/selftests: Fix unlocked mm.stolen in reset selftest
Date: Wed, 16 Sep 2026 11:17:34 +0200 [thread overview]
Message-ID: <DLGMMDGV9F5B.36Q7EV9ZO50PX@intel.com> (raw)
In-Reply-To: <apDFQTbBkAzFX5uc@zenone.zhora.eu>
Hi Andi,
On Fri Aug 28, 2026 at 1:17 AM CEST, Andi Shyti wrote:
> Hi Sebastian,
>
>> On Wed Aug 26, 2026 at 7:31 PM CEST, Andi Shyti wrote:
>> > Have you checked sashiko's reviews? They look valid to me.
>> >
>> I checked, and there are already existing issues, probably wrth fixing,
>> but they're outside the scope of this patch.
>
> actually you are in the middle of those issues :-)
>
>> > ...
>> >
>> >> @@ -95,9 +96,12 @@ __igt_reset_stolen(struct intel_gt *gt,
>> >> ggtt->error_capture.start,
>> >> PAGE_SIZE);
>> >>
>> >> - if (!__drm_mm_interval_first(>->i915->mm.stolen,
>> >> - page << PAGE_SHIFT,
>> >> - ((page + 1) << PAGE_SHIFT) - 1))
>> >> + mutex_lock(>->i915->mm.stolen_lock);
>> >> + unused = !__drm_mm_interval_first(>->i915->mm.stolen,
>> >> + page << PAGE_SHIFT,
>> >> + ((page + 1) << PAGE_SHIFT) - 1);
>> >> + mutex_unlock(>->i915->mm.stolen_lock);
>> >> + if (unused)
>> >
>> > this is always false.
>> Nothing really changes here, even if the if statement is always false,
>> we still need to guarantee safe access.
>
> I'm not getting your point. Do you mean that if nothing changes I
> can add things like "if (0) do_whatever_you_want;"?
I try not to change any logic, so it's now essentially if(0), just as
it was before, but now with a safe lock. I could dig deeper, but I think
it's good to fix the unrestricted access first.
--
Best regards,
Sebastian
next prev parent reply other threads:[~2026-09-16 9:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 13:40 [PATCH] drm/i915/selftests: Fix unlocked mm.stolen in reset selftest Sebastian Brzezinka
2026-08-21 13:48 ` sashiko-bot
2026-08-21 14:36 ` ✓ i915.CI.BAT: success for " Patchwork
2026-08-21 18:19 ` ✗ i915.CI.Full: failure " Patchwork
2026-08-25 16:29 ` ✓ i915.CI.BAT: success for drm/i915/selftests: Fix unlocked mm.stolen in reset selftest (rev2) Patchwork
2026-08-25 19:36 ` ✗ i915.CI.Full: failure " Patchwork
2026-08-26 8:49 ` [PATCH] drm/i915/selftests: Fix unlocked mm.stolen in reset selftest Krzysztof Karas
2026-08-26 9:11 ` Sebastian Brzezinka
2026-08-26 17:31 ` Andi Shyti
2026-08-27 8:39 ` Sebastian Brzezinka
2026-08-27 23:17 ` Andi Shyti
2026-09-16 9:17 ` Sebastian Brzezinka [this message]
2026-09-17 12:09 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Fix unlocked mm.stolen in reset selftest (rev3) 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=DLGMMDGV9F5B.36Q7EV9ZO50PX@intel.com \
--to=sebastian.brzezinka@intel.com \
--cc=andi.shyti@kernel.org \
--cc=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@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