From: "Christian König" <christian.koenig@amd.com>
To: Colin Ian King <colin.king@canonical.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Gerd Hoffmann <kraxel@redhat.com>, Huang Rui <ray.huang@amd.com>,
amd-gfx mailing list <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
virtualization@lists.linux-foundation.org,
spice-devel@lists.freedesktop.org
Subject: Re: drm/ttm: switch to per device LRU lock
Date: Thu, 25 Mar 2021 16:14:55 +0100 [thread overview]
Message-ID: <aaef965f-608a-e77d-9a4a-b91951298836@amd.com> (raw)
In-Reply-To: <22ad0b20-b879-bcad-5c94-80c162a9da74@canonical.com>
Thanks! Just a copy&paste issue.
Patch to fix this is on the mailing list.
Christian.
Am 25.03.21 um 16:00 schrieb Colin Ian King:
> Hi,
>
> Static analysis with Coverity in linux-next has detected an issue in
> drivers/gpu/drm/ttm/ttm_bo.c with the follow commit:
>
> commit a1f091f8ef2b680a5184db065527612247cb4cae
> Author: Christian König <christian.koenig@amd.com>
> Date: Tue Oct 6 17:26:42 2020 +0200
>
> drm/ttm: switch to per device LRU lock
>
> Instead of having a global lock for potentially less contention.
>
>
> The analysis is as follows:
>
> 617 int ttm_mem_evict_first(struct ttm_device *bdev,
> 618 struct ttm_resource_manager *man,
> 619 const struct ttm_place *place,
> 620 struct ttm_operation_ctx *ctx,
> 621 struct ww_acquire_ctx *ticket)
> 622 {
> 1. assign_zero: Assigning: bo = NULL.
>
> 623 struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
> 624 bool locked = false;
> 625 unsigned i;
> 626 int ret;
> 627
>
> Explicit null dereferenced (FORWARD_NULL)2. var_deref_op:
> Dereferencing null pointer bo.
>
> 628 spin_lock(&bo->bdev->lru_lock);
> 629 for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
>
> The spin_lock on bo is dereferencing a null bo pointer.
>
> Colin
prev parent reply other threads:[~2021-03-25 15:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 15:00 Colin Ian King
2021-03-25 15:14 ` Christian König [this message]
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=aaef965f-608a-e77d-9a4a-b91951298836@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ray.huang@amd.com \
--cc=spice-devel@lists.freedesktop.org \
--cc=virtualization@lists.linux-foundation.org \
/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
Powered by JetHome