mISDN: Fixed missing spin lock on pipeline process
authorAndreas Eversberg <andreas@eversberg.eu>
Fri, 22 May 2009 11:04:47 +0000 (11:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 May 2009 07:51:32 +0000 (00:51 -0700)
Need to protect the complete pipeline.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/dsp_core.c

index 1c49368e0a90b34800d15a9d8078b734c66133db..621ea9bc7c25171d95f75e9c63edf3fdba832275 100644 (file)
@@ -704,6 +704,8 @@ dsp_function(struct mISDNchannel *ch,  struct sk_buff *skb)
                        break;
                }
 
+               spin_lock_irqsave(&dsp_lock, flags);
+
                /* decrypt if enabled */
                if (dsp->bf_enable)
                        dsp_bf_decrypt(dsp, skb->data, skb->len);
@@ -741,11 +743,11 @@ dsp_function(struct mISDNchannel *ch,  struct sk_buff *skb)
                        }
                }
                /* we need to process receive data if software */
-               spin_lock_irqsave(&dsp_lock, flags);
                if (dsp->pcm_slot_tx < 0 && dsp->pcm_slot_rx < 0) {
                        /* process data from card at cmx */
                        dsp_cmx_receive(dsp, skb);
                }
+
                spin_unlock_irqrestore(&dsp_lock, flags);
 
                if (dsp->rx_disabled) {