lkml.org 
[lkml]   [2013]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -mm -next] ipc,sem: fix lockdep false positive
From
Date
On Mon, 2013-03-25 at 14:42 -0700, Michel Lespinasse wrote:
> depth nesting here...
> Adding Peter & Ingo for advice about how to proceed

> > +++ b/ipc/sem.c
> > @@ -357,7 +357,7 @@ static inline int sem_lock(struct sem_array
> *sma, struct sembuf *sops,
> > spin_lock(&sma->sem_perm.lock);
> > for (i = 0; i < sma->sem_nsems; i++) {
> > struct sem *sem = sma->sem_base + i;
> > - spin_lock(&sem->lock);
> > + spin_lock_nested(&sem->lock,
> SINGLE_DEPTH_NESTING);
> > }
> > locknum = -1;
> > }

Right, so as walken said, this isn't going to work right.

I need a little more information as I've not really paid much attention
to this stuff. Firstly, is there a limit to sem_nsems or is this a
random user specified number? Secondly do we care about lock order at
all, or is array order the only order that counts?





\
 
 \ /
  Last update: 2013-03-26 15:01    [W:1.969 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site