public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sleep under spinlock, sequencer.c, 2.6.12.5
@ 2005-08-19  8:13 Peter T. Breuer
  2005-08-19 18:07 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Peter T. Breuer @ 2005-08-19  8:13 UTC (permalink / raw)
  To: linux kernel


The following "sleep under spinlock" is still present as of linux
2.6.12.5 in sound/oss/sequencer.c in midi_outc:


        n = 3 * HZ;             /* Timeout */

        spin_lock_irqsave(&lock,flags);
        while (n && !midi_devs[dev]->outputc(dev, data)) {
                interruptible_sleep_on_timeout(&seq_sleeper, HZ/25);
                n--;
        }
        spin_unlock_irqrestore(&lock,flags);


I haven't thought about it, just noted it. It's been there forever
(some others in the sound architecture have been gradually disappearing
as newer kernels come out).


This code found during an analysis of about 1.5 million lines of kernel
code by the static kernel code analyser at

   ftp://oboe.it.uc3m.es/pub/Programs/c-1.2.*.tgz

(and yes, I am the author - if anyone wants to help please contact me).

Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-22 21:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19  8:13 sleep under spinlock, sequencer.c, 2.6.12.5 Peter T. Breuer
2005-08-19 18:07 ` Alan Cox
2005-08-20  0:01   ` Nish Aravamudan
2005-08-22 15:17     ` Peter T. Breuer
2005-08-22 16:22       ` Nish Aravamudan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox