public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <glisse@freedesktop.org>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.sf.net, LKML <linux-kernel@vger.kernel.org>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [PATCH 2/2] drm: mm always protect change to unused_nodes with unused_lock spinlock
Date: Mon, 16 Nov 2009 09:31:34 +0100	[thread overview]
Message-ID: <1258360294.1989.2.camel@localhost> (raw)
In-Reply-To: <21d7e9970911151542n49f15a9dn6481d0bc2bdfbc45@mail.gmail.com>

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


  reply	other threads:[~2009-11-16  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 19:56 [PATCH 2/2] drm: mm always protect change to unused_nodes with unused_lock spinlock Jerome Glisse
2009-11-15 23:42 ` Dave Airlie
2009-11-16  8:31   ` Jerome Glisse [this message]
2009-11-16 16:23   ` Thomas Hellstrom
2009-11-16 16:32     ` Robert Noland

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=1258360294.1989.2.camel@localhost \
    --to=glisse@freedesktop.org \
    --cc=airlied@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.sf.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thellstrom@vmware.com \
    /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