All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Hirte <johannes.hirte-rSzmJuYucINa7YElYzY8/Q@public.gmane.org>
To: Andrey Grodzovsky <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>
Cc: sunpeng.li-5C7GfCeVMHo@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	"Luís Mendes"
	<luis.p.mendes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Harry Wentland" <harry.wentland-5C7GfCeVMHo@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: BUG: KASAN: use-after-free in amdgpu_job_free_cb
Date: Fri, 12 Jan 2018 22:47:07 +0100	[thread overview]
Message-ID: <20180112214706.GA23419@probook> (raw)
In-Reply-To: <77f6ae06-988a-54c8-fa57-556df22cc202-5C7GfCeVMHo@public.gmane.org>

On 2018 Jan 12, Andrey Grodzovsky wrote:
> Hi, looks to me  like a different issue (not related) then the one  
> Johannes, reports, your issue was already reported by some one (can't 
> remember the thread of hand) and looks like in shader hang or GPU 
> scheduler synchronization issue while  Johannes's use after free is pure 
> software logic issue in either KMS atomic framework or more probably in 
> AMDGPU/DC (DAL).
> 
> 
> Johanes, I attached a debug patch which forces the cursor update to wait 
> for any  page flip in progress, can you give it a try and see if the 
> issue is gone ? This is not an actual fix but just to evaluate the reason.
> 

> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 5a70682..323d020 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4908,7 +4908,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>          * synchronization events.
>          */
>  
> -       if (lock_and_validation_needed) {
> +       if (lock_and_validation_needed || state->legacy_cursor_update == true) {
>  
>                 ret = do_aquire_global_lock(dev, state);
>                 if (ret)
> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> index a1a751b..6d6ffdf 100644
> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c

The patch seems incomplete. 

-- 
Regards,
  Johannes

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-01-12 21:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 11:43 BUG: KASAN: use-after-free in amdgpu_job_free_cb Luís Mendes
     [not found] ` <CAEzXK1p9b8vOPZ_ed-E6S+CDcpUStwPopHGzny7tN6pnzZdGEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-12 15:20   ` Andrey Grodzovsky
     [not found]     ` <77f6ae06-988a-54c8-fa57-556df22cc202-5C7GfCeVMHo@public.gmane.org>
2018-01-12 21:47       ` Johannes Hirte [this message]
2018-01-12 21:52         ` Andrey Grodzovsky
     [not found]           ` <11b826ef-1a47-33db-dccd-7a4867547fbf-5C7GfCeVMHo@public.gmane.org>
2018-01-13 19:47             ` Johannes Hirte
2018-01-14 16:44               ` Grodzovsky, Andrey
     [not found]                 ` <BN6PR1201MB0115E7D6A5932AC3A932FA98EA150-6iU6OBHu2P+5DJ1TLF5OxWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-14 20:34                   ` Johannes Hirte
2018-01-14 23:22                     ` Grodzovsky, Andrey
     [not found]                       ` <BN6PR1201MB0115FCD51D291D0831F6887BEA150-6iU6OBHu2P+5DJ1TLF5OxWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-15 14:58                         ` Harry Wentland
     [not found]                           ` <fe824e81-6548-5c6e-ae3f-80aaf7ee45a2-5C7GfCeVMHo@public.gmane.org>
2018-01-15 16:26                             ` Andrey Grodzovsky
  -- strict thread matches above, loose matches on Subject: below --
2018-01-03  8:35 Johannes Hirte
2018-01-03  9:36 ` Johannes Hirte
2018-01-09 14:44   ` Johannes Hirte
2018-01-10 21:25     ` Andrey Grodzovsky
     [not found]       ` <b30d8818-727e-906b-9203-47a5a5b03605-5C7GfCeVMHo@public.gmane.org>
2018-01-11 22:55         ` Johannes Hirte
2018-01-12  4:30           ` Andrey Grodzovsky
     [not found]             ` <2d0470e3-2d9c-0139-1bd4-493d97e419eb-5C7GfCeVMHo@public.gmane.org>
2018-01-12  8:54               ` Johannes Hirte

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=20180112214706.GA23419@probook \
    --to=johannes.hirte-rszmjuyucina7yelyzy8/q@public.gmane.org \
    --cc=Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=luis.p.mendes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sunpeng.li-5C7GfCeVMHo@public.gmane.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 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.