AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Felix Kuehling <Felix.Kuehling@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout
Date: Fri, 15 Jul 2022 08:46:12 +0200	[thread overview]
Message-ID: <bbb644ab-b1ab-4bc2-1b08-884fe4fa460b@amd.com> (raw)
In-Reply-To: <20220714215820.807146-1-Felix.Kuehling@amd.com>

Am 14.07.22 um 23:58 schrieb Felix Kuehling:
> Backport of Christian's patch 81b0d0e4f811 to amd-staging-drm-next. This
> branch may be nearly obsolete, but this patch may still be worth
> applying as it can serve as a template for backports to some release
> branches. It fixes intermittent kernel oopses when memory is severely
> overcommitted.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>

I was hoping that Alex rebase would land before anybody notices this 
problem.

Anyway patch is Reviewed-by: Christian König <christian.koenig@amd.com>.

Regards,
Christian.

> ---
>   drivers/gpu/drm/ttm/ttm_device.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index be24bb6cefd0..165a6cbb45d5 100644
> --- a/drivers/gpu/drm/ttm/ttm_device.c
> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> @@ -157,6 +157,9 @@ int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
>   			list_for_each_entry(bo, &man->lru[j], lru) {
>   				uint32_t num_pages = PFN_UP(bo->base.size);
>   
> +				if (!bo->resource)
> +					continue;
> +
>   				ret = ttm_bo_swapout(bo, ctx, gfp_flags);
>   				/* ttm_bo_swapout has dropped the lru_lock */
>   				if (!ret)


  reply	other threads:[~2022-07-15  6:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 21:58 [PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout Felix Kuehling
2022-07-15  6:46 ` Christian König [this message]
     [not found] <20220603104604.456991-1-christian.koenig@amd.com>
     [not found] ` <c9b23cac-6bf0-e8ad-d6b1-f59c1ee1569f@amd.com>
2022-06-03 22:44   ` Felix Kuehling
2022-06-06 10:20     ` Christian König
2022-06-06 13:15 ` Felix Kuehling

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=bbb644ab-b1ab-4bc2-1b08-884fe4fa460b@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.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