Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 22:28:31 +0200
From:      Jan-Espen Pettersen <sigsegv@leakingmemory.org>
To:        sigsegv@leakingmemory.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: lock order reversal
Message-ID:  <200304302228.31718.sigsegv@leakingmemory.org>
In-Reply-To: <200304302220.27479.sigsegv@leakingmemory.org>
References:  <200304301455.23334.georgfunk@web.de> <200304301828.37987.georgfunk@web.de> <200304302220.27479.sigsegv@leakingmemory.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary-00=_vHDs+qGpCIZTV4t
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wednesday 30 April 2003 22:20, Jan-Espen Pettersen wrote:
> On Wednesday 30 April 2003 18:28, Georg Funk wrote:
> > hm, the patch doesn't seem to work:
> >
> > --------------------------------------------------
> > #patch < pcm.diff
> > Hmm...  Looks like a normal diff to me...
> > The text leading up to this was:
> > --------------------------
> >
> > |cvs diff: Diffing sys/dev/sound/pcm
> > |Index: sys/dev/sound/pcm/dsp.c
> > |===================================================================
> > |RCS file:
> >
> > /old/pub/FreeBSD/development/FreeBSD-CVS/src/sys/dev/sound/pcm/dsp.c,v
> >
> > |retrieving revision 1.62
> > |diff -r1.62 dsp.c
> >
> > --------------------------
> > Patching file dsp.c using Plan A...
> > Hunk #1 failed at 265.
> > Hunk #2 failed at 270.
> > Hunk #3 failed at 287.
> > Hunk #4 succeeded at 304.
> > 3 out of 4 hunks failed--saving rejects to dsp.c.rej
> > done
> >
> > On Wednesday 30 April 2003 16:33, you wrote:
> > > On Wednesday 30 April 2003 14:55, Georg Funk wrote:
> > > > Hi!
> > > > I'm running the FreeBSD 5.0-RELEASE. When I boot up, this appears:
> > > >
> > > > 1st 0xc12a7230 process lock (process lock) @
> > > > ../../../kern/kern_descrip.c:2112 lock order reversal
> > > > I haven't noticed any disfunctions, but what does this mean?
> > > >
> > > > I get a similar error when I use my soundcard:
> > > >
> > > > lock order reversal
> > > >  1st 0xc120a680 pcm0 (sound softc) @ ../../../dev/sound/isa/mss.c:177
> > > >  2nd 0xc120a740 pcm0:play:0 (pcm channel) @
> > > > ../../../dev/sound/pcm/channel.c:441
> > > >
> > > > I have to restart the KDE artsd before the soundcard works correct.
> > > > Please give me advice how to solve this.
> > > >
> > > > Thanks in advance, Georg Funk
> > >
> > > I have also seen that problem, and this patch seems to work here..
> > > It is probably not very optimized, but the lock order reversal didn't
> > > show up again...
> > >
> > > cvs diff: Diffing sys/dev/sound/pcm
> > > Index: sys/dev/sound/pcm/dsp.c
> > > ===================================================================
> > > RCS file:
> > > /old/pub/FreeBSD/development/FreeBSD-CVS/src/sys/dev/sound/pcm/dsp.c,v
> > > retrieving revision 1.62
> > > diff -r1.62 dsp.c
> > > 265,266c265
> > > <       pcm_unlock(d);
> > > <       /* finished with snddev, new channels still locked */
> > > ---
> > >
> > > >       /* keep the snddev lock to avoid a lock order reversal, new
> > > > channels still locked */
> > >
> > > 271d269
> > > <                       pcm_lock(d);
> > > 289d286
> > > <                       pcm_lock(d);
> > > 306a304
> > >
> > > >       pcm_unlock(d);
>
> Sorry, I was in a hurry. I was supposed to be at work 30 minutes later...
>
> This one should work:
>

Eh. Sorry again, wordwrap did put a few newlines the patch. Here is a new one:

I'm really sorry for wasting your time and bandwith, etc.
Jan-Espen Pettersen

--Boundary-00=_vHDs+qGpCIZTV4t--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304302228.31718.sigsegv>