All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
	"Huang Rui" <ray.huang-5C7GfCeVMHo@public.gmane.org>
Cc: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/ttm: once more fix ttm_bo_bulk_move_lru_tail
Date: Fri, 14 Sep 2018 12:46:38 +0200	[thread overview]
Message-ID: <b432d6f9-2469-9a1f-6a87-634126f1e1da@amd.com> (raw)
In-Reply-To: <4bf23786-ffdb-ee6e-1446-9dbc8d8ed5d6-otUistvHUpPR7s880joybQ@public.gmane.org>

Am 14.09.2018 um 11:22 schrieb Michel Dänzer:
> On 2018-09-14 10:22 a.m., Huang Rui wrote:
>> On Thu, Sep 13, 2018 at 07:32:24PM +0800, Christian König wrote:
>>> Am 13.09.2018 um 10:31 schrieb Huang Rui:
>>>> On Wed, Sep 12, 2018 at 09:23:55PM +0200, Christian König wrote:
>>>>> While cutting the lists we sometimes accidentally added a list_head from
>>>>> the stack to the LRUs, effectively corrupting the list.
>>>>>
>>>>> Remove the list cutting and use explicit list manipulation instead.
>>>> This patch actually fixes the corruption bug. Was it a defect of
>>>> list_cut_position or list_splice handlers?
>>> We somehow did something illegal with list_cut_position. I haven't
>>> narrowed it down till the end, but we ended up with list_heads from the
>>> stack to the lru.
>> I am confused, in theory, even we do any manipulation with list helper, it
>> should not trigger the list corruption. The usage of those helpers should
>> ensure the list operation safely...
> There's nothing the helpers can do about being passed in pointers to
> stack memory. It's a bug in the code using the helpers.

Actually I'm not 100% sure of that. To me it looks like we hit a corner 
case list_cut_position doesn't support.

Or we indeed had a logic error in how we called it, anyway the explicit 
implementation only uses 6 assignments and so is much easier to handle.

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

  parent reply	other threads:[~2018-09-14 10:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 19:23 [PATCH] drm/ttm: once more fix ttm_bo_bulk_move_lru_tail Christian König
2018-09-13  8:35 ` Michel Dänzer
2018-09-13  8:55   ` Christian König
2018-09-13  9:00     ` Michel Dänzer
     [not found] ` <20180912192355.2359-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-09-12 19:42   ` Alex Deucher
2018-09-13  8:31   ` Huang Rui
2018-09-13 11:32     ` Christian König
     [not found]       ` <c2471ef9-1bc7-517e-27f6-a00236a9b40b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-14  8:22         ` Huang Rui
2018-09-14  9:22           ` Michel Dänzer
     [not found]             ` <4bf23786-ffdb-ee6e-1446-9dbc8d8ed5d6-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-09-14 10:46               ` Christian König [this message]
2018-09-17  9:40               ` Huang Rui
2018-09-13  8:35   ` Michel Dänzer
2018-09-13 14:25   ` Alex Deucher
     [not found]     ` <CADnq5_PiVfsBjGxN0wsbHL0o5rWYRuVehTeZvN396kp=GVZTNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-13 17:29       ` 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=b432d6f9-2469-9a1f-6a87-634126f1e1da@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    --cc=ray.huang-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.