[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1258360294.1989.2.camel@localhost>
Date: Mon, 16 Nov 2009 09:31:34 +0100
From: Jerome Glisse <glisse@...edesktop.org>
To: Dave Airlie <airlied@...il.com>
Cc: dri-devel@...ts.sf.net, LKML <linux-kernel@...r.kernel.org>,
Thomas Hellstrom <thellstrom@...are.com>,
Chris Wilson <chris@...is-wilson.co.uk>
Subject: Re: [PATCH 2/2] drm: mm always protect change to unused_nodes with
unused_lock spinlock
On Mon, 2009-11-16 at 09:42 +1000, Dave Airlie wrote:
> On Sat, Nov 14, 2009 at 5:56 AM, Jerome Glisse <jglisse@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists