All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6: spinlock bug in sound/oss/dmabuf.c
@ 2004-01-05 17:28 Christian Borntraeger
  2004-01-06  4:03 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2004-01-05 17:28 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I think I found a bug in sound/oss/dmabuf.c

DMAbuf_getrdbuffer holds a spinlock and possibly calls dma_reset_input. The 
dma_reset_input tries to hold that spinlock again:

int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock)
{
        struct audio_operations *adev = audio_devs[dev];
        unsigned long flags;
        int err = 0, n = 0;
        struct dma_buffparms *dmap = adev->dmap_in;
[...]
                spin_lock_irqsave(&dmap->lock,flags);
                if (!timeout) {
                        /* FIXME: include device name */
                        err = -EIO;
                        printk(KERN_WARNING "Sound: DMA (input) timed out..
                        dma_reset_input(dev);
[...]


static void dma_reset_input(int dev)
{
        struct audio_operations *adev = audio_devs[dev];
        unsigned long flags;
        struct dma_buffparms *dmap = adev->dmap_in;

        spin_lock_irqsave(&dmap->lock,flags);


Any opinions?

cheers

Christian


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

end of thread, other threads:[~2004-01-06  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 17:28 2.6: spinlock bug in sound/oss/dmabuf.c Christian Borntraeger
2004-01-06  4:03 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.