lkml.org 
[lkml]   [2009]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] drm: mm always protect change to unused_nodes with unused_lock spinlock
From
Date
On Mon, 2009-11-16 at 09:42 +1000, Dave Airlie wrote:
> On Sat, Nov 14, 2009 at 5:56 AM, Jerome Glisse <jglisse@redhat.com> wrote:
> > unused_nodes modification needs to be protected by unused_lock spinlock.
> > Here is an example of an usage where there is no such protection without
> > this patch.
> >
> > Process 1: 1-drm_mm_pre_get(this function modify unused_nodes list)
> > 2-spin_lock(spinlock protecting mm struct)
> > 3-drm_mm_put_block(this function might modify unused_nodes
> > list but doesn't protect modification with unused_lock)
> > 4-spin_unlock(spinlock protecting mm struct)
> > Process2: 1-drm_mm_pre_get(this function modify unused_nodes list)
> > At this point Process1 & Process2 might both be doing modification to
> > unused_nodes list. This patch add unused_lock protection into
> > drm_mm_put_block to avoid such issue.
>
> Have we got a bug number or reproducer for this?
>
> I've cc'ed Thomas and Chris who were last ppl to touch drm_mm.c for some
> sort of acks.
>
> Dave.

No bug, this comes from code review while working on TTM. I think my
analysis is correct.

Cheers,
Jerome



\
 
 \ /
  Last update: 2009-11-16 09:37    [W:2.065 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site