From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Cc: "Christian König" <christian.koenig@amd.com>
Subject: Re: [Intel-gfx] [PATCH v2 1/3] drm/mm: Ensure that the entry is not NULL before extracting rb_node
Date: Wed, 23 Feb 2022 14:03:58 +0000 [thread overview]
Message-ID: <8a892190-73ce-fc7d-9c93-e17a929df78e@linux.intel.com> (raw)
In-Reply-To: <a4fd740802ec4ab98bf8480f069e5ebf@intel.com>
On 23/02/2022 04:35, Kasireddy, Vivek wrote:
> Hi Tvrtko,
>
>>
>> On 18/02/2022 03:47, Kasireddy, Vivek wrote:
>>> Hi Tvrtko,
>>>
>>>>
>>>> On 17/02/2022 07:50, Vivek Kasireddy wrote:
>>>>> While looking for next holes suitable for an allocation, although,
>>>>> it is highly unlikely, make sure that the DECLARE_NEXT_HOLE_ADDR
>>>>> macro is using a valid node before it extracts the rb_node from it.
>>>>
>>>> Was the need for this just a consequence of insufficient locking in the
>>>> i915 patch?
>>> [Kasireddy, Vivek] Partly, yes; but I figured since we are anyway doing
>>> if (!entry || ..), it makes sense to dereference entry and extract the rb_node
>>> after this check.
>>
>> Unless I am blind I don't see that it makes a difference.
>> "&entry->rb_hole_addr" is taking an address of, which works "fine" is
> [Kasireddy, Vivek] Ah, didn't realize it was the same thing as offsetof().
>
>> entry is NULL. And does not get past the !entry check for the actual
>> de-reference via RB_EMPTY_NODE. With your patch you move that after the
>> !entry check but still have it in the RB_EMPTY_NODE macro. Again, unless
>> I am blind, I think just drop this patch.
> [Kasireddy, Vivek] Sure; do you want me to send another version with this
> patch dropped? Or, would you be able to just merge the other two from the
> latest version of this series?
Please send without the first patch so we get clean set of CI results.
You can use "--subject-prefix=CI" with git format-patchs and
--suppress-cc=all with git send-email to avoid spamming people and let
readers know the re-send is just for the purpose of getting CI results.
Regards,
Tvrtko
next prev parent reply other threads:[~2022-02-23 14:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 7:50 [Intel-gfx] [PATCH v2 0/3] drm/mm: Add an iterator to optimally walk over holes suitable for an allocation Vivek Kasireddy
2022-02-17 7:50 ` [Intel-gfx] [PATCH v2 1/3] drm/mm: Ensure that the entry is not NULL before extracting rb_node Vivek Kasireddy
2022-02-17 9:09 ` Tvrtko Ursulin
2022-02-18 3:47 ` Kasireddy, Vivek
2022-02-21 12:39 ` Tvrtko Ursulin
2022-02-23 4:35 ` Kasireddy, Vivek
2022-02-23 14:03 ` Tvrtko Ursulin [this message]
2022-02-17 7:50 ` [Intel-gfx] [PATCH v2 2/3] drm/mm: Add an iterator to optimally walk over holes for an allocation (v4) Vivek Kasireddy
2022-02-17 7:50 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/gem: Don't try to map and fence large scanout buffers (v8) Vivek Kasireddy
2022-02-17 9:19 ` Tvrtko Ursulin
2022-02-17 18:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/mm: Add an iterator to optimally walk over holes suitable for an allocation (rev2) Patchwork
2022-02-17 18:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-17 19:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-18 5:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=8a892190-73ce-fc7d-9c93-e17a929df78e@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vivek.kasireddy@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