Commit c73b1f6a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

atm: firestream: fix interruptible_sleep_on race

interruptible_sleep_on is racy and going away. This replaces the one use
in the firestream driver with the appropriate wait_event_interruptible
variant.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53e0b080
...@@ -736,8 +736,8 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q) ...@@ -736,8 +736,8 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q)
skb = td->skb; skb = td->skb;
if (skb == FS_VCC (ATM_SKB(skb)->vcc)->last_skb) { if (skb == FS_VCC (ATM_SKB(skb)->vcc)->last_skb) {
wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait);
FS_VCC (ATM_SKB(skb)->vcc)->last_skb = NULL; FS_VCC (ATM_SKB(skb)->vcc)->last_skb = NULL;
wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait);
} }
td->dev->ntxpckts--; td->dev->ntxpckts--;
...@@ -1123,7 +1123,7 @@ static void fs_close(struct atm_vcc *atm_vcc) ...@@ -1123,7 +1123,7 @@ static void fs_close(struct atm_vcc *atm_vcc)
this sleep_on, we'll lose any reference to these packets. Memory leak! this sleep_on, we'll lose any reference to these packets. Memory leak!
On the other hand, it's awfully convenient that we can abort a "close" that On the other hand, it's awfully convenient that we can abort a "close" that
is taking too long. Maybe just use non-interruptible sleep on? -- REW */ is taking too long. Maybe just use non-interruptible sleep on? -- REW */
interruptible_sleep_on (& vcc->close_wait); wait_event_interruptible(vcc->close_wait, !vcc->last_skb);
} }
txtp = &atm_vcc->qos.txtp; txtp = &atm_vcc->qos.txtp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment