public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Thomas Backlund <tmb@tmb.nu>
Cc: stable@vger.kernel.org, patches@lists.linux.dev,
	"Christian König" <christian.koenig@amd.com>,
	"Pelloux-Prayer,
	Pierre-Eric" <Pierre-eric.Pelloux-prayer@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	Pelloux-Prayer@vger.kernel.org
Subject: Re: [PATCH 6.4 213/292] drm/ttm: never consider pinned BOs for eviction&swap
Date: Sat, 22 Jul 2023 13:43:25 +0200	[thread overview]
Message-ID: <2023072207-bagginess-opal-a71f@gregkh> (raw)
In-Reply-To: <ccf59286-1698-3f02-e472-edda5208c58d@tmb.nu>

On Fri, Jul 21, 2023 at 04:51:01PM +0000, Thomas Backlund wrote:
> Den 2023-07-21 kl. 19:05, skrev Greg Kroah-Hartman:
> > From: Christian König <christian.koenig@amd.com>
> > 
> > commit a2848d08742c8e8494675892c02c0d22acbe3cf8 upstream.
> > 
> > There is a small window where we have already incremented the pin count
> > but not yet moved the bo from the lru to the pinned list.
> > 
> > Signed-off-by: Christian König <christian.koenig@amd.com>
> > Reported-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer@amd.com>
> > Tested-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer@amd.com>
> > Acked-by: Alex Deucher <alexander.deucher@amd.com>
> > Cc: stable@vger.kernel.org
> > Link: https://patchwork.freedesktop.org/patch/msgid/20230707120826.3701-1-christian.koenig@amd.com
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >   drivers/gpu/drm/ttm/ttm_bo.c |    6 ++++++
> >   1 file changed, 6 insertions(+)
> > 
> > --- a/drivers/gpu/drm/ttm/ttm_bo.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> > @@ -517,6 +517,12 @@ static bool ttm_bo_evict_swapout_allowab
> >   {
> >   	bool ret = false;
> >   
> > +	if (bo->pin_count) {
> > +		*locked = false;
> > +		*busy = false;
> > +		return false;
> > +	}
> > +
> >   	if (bo->base.resv == ctx->resv) {
> >   		dma_resv_assert_held(bo->base.resv);
> >   		if (ctx->allow_res_evict)
> > 
> 
> 
> This one will trigger GPF and needs a follow-up fix that is not upstream 
> yet:
> https://patchwork.freedesktop.org/patch/547897/
> 
> as reported on LKML in thread:
> [bug/bisected] commit a2848d08742c8e8494675892c02c0d22acbe3cf8 cause 
> general protection fault, probably for non-canonical address 
> 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI

Thanks for letting me know, I've dropped this from the queues now.
Please let us know when we should add it back.

greg k-h

  reply	other threads:[~2023-07-22 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 16:51 [PATCH 6.4 213/292] drm/ttm: never consider pinned BOs for eviction&swap Thomas Backlund
2023-07-22 11:43 ` Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-21 16:01 [PATCH 6.4 000/292] 6.4.5-rc1 review Greg Kroah-Hartman
2023-07-21 16:05 ` [PATCH 6.4 213/292] drm/ttm: never consider pinned BOs for eviction&swap Greg Kroah-Hartman

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=2023072207-bagginess-opal-a71f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Pelloux-Prayer@vger.kernel.org \
    --cc=Pierre-eric.Pelloux-prayer@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=tmb@tmb.nu \
    /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