From: Felix Kuehling <felix.kuehling@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
mike@fireburn.co.uk, dri-devel@lists.freedesktop.org,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>
Cc: "Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout
Date: Mon, 6 Jun 2022 09:15:42 -0400 [thread overview]
Message-ID: <91627755-c7da-960e-eaac-6d6644b71490@amd.com> (raw)
In-Reply-To: <20220603104604.456991-1-christian.koenig@amd.com>
Am 2022-06-03 um 06:46 schrieb Christian König:
> Resources about to be destructed are not tied to BOs any more.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_device.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index a0562ab386f5..e7147e304637 100644
> --- a/drivers/gpu/drm/ttm/ttm_device.c
> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> @@ -156,8 +156,12 @@ int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
>
> ttm_resource_manager_for_each_res(man, &cursor, res) {
> struct ttm_buffer_object *bo = res->bo;
> - uint32_t num_pages = PFN_UP(bo->base.size);
> + uint32_t num_pages;
>
> + if (!bo)
> + continue;
> +
> + num_pages = PFN_UP(bo->base.size);
> ret = ttm_bo_swapout(bo, ctx, gfp_flags);
> /* ttm_bo_swapout has dropped the lru_lock */
> if (!ret)
next prev parent reply other threads:[~2022-06-06 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220603104604.456991-1-christian.koenig@amd.com>
[not found] ` <c9b23cac-6bf0-e8ad-d6b1-f59c1ee1569f@amd.com>
2022-06-03 22:44 ` [PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout Felix Kuehling
2022-06-06 10:20 ` Christian König
2022-06-06 13:15 ` Felix Kuehling [this message]
2022-07-14 21:58 Felix Kuehling
2022-07-15 6:46 ` Christian König
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=91627755-c7da-960e-eaac-6d6644b71490@amd.com \
--to=felix.kuehling@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=mike@fireburn.co.uk \
/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