From: Boris Brezillon <boris.brezillon@collabora.com>
To: Liviu Dudau <liviu.dudau@arm.com>
Cc: Steven Price <steven.price@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jann Horn <jannh@google.com>
Subject: Re: [PATCH] drm/panthor: Lock XArray when getting entries for heap and VM
Date: Wed, 6 Nov 2024 14:21:33 +0100 [thread overview]
Message-ID: <20241106142133.09378b5a@collabora.com> (raw)
In-Reply-To: <ZytqzTg2QnEkvDcl@e110455-lin.cambridge.arm.com>
On Wed, 6 Nov 2024 13:10:37 +0000
Liviu Dudau <liviu.dudau@arm.com> wrote:
> panthor_heap_pool_release() does not take the panthor_heap_pool::lock, so the protection
> is not really there. I could fix panthor_heap_pool_release() and then add a
> lockdep_assert_held() before both calls to xa_load() if you think that's a better
> solution.
Hm, but panthor_heap_pool_release() doesn't release the heap contexts,
it just calls xa_destroy(). If we have objects remaining in the xarray,
they'll be leaked, but that's not a race. BTW, can we make this two
separate patches. I feel like the thing on the vm is an actual fix,
while the second one (adding a helper with a lockdep_assert()) is
safety net that's worth having, but not necessarily something we need
to backport.
next prev parent reply other threads:[~2024-11-06 13:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 12:07 [PATCH] drm/panthor: Lock XArray when getting entries for heap and VM Liviu Dudau
2024-11-06 12:14 ` Mihail Atanassov
2024-11-06 14:54 ` Mihail Atanassov
2024-11-06 12:16 ` Boris Brezillon
2024-11-06 13:10 ` Liviu Dudau
2024-11-06 13:21 ` Boris Brezillon [this message]
2024-11-06 18:59 ` Liviu Dudau
2024-11-06 12:17 ` Boris Brezillon
2024-11-06 13:17 ` Steven Price
2024-11-06 13:34 ` Boris Brezillon
2024-11-06 13:40 ` Steven Price
2024-11-06 17:32 ` kernel test robot
2024-11-06 17:53 ` kernel test robot
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=20241106142133.09378b5a@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.