Skip to content

Commit

Permalink
atm: firestream: fix interruptible_sleep_on race
Browse files Browse the repository at this point in the history
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: Arnd Bergmann <arnd@arndb.de>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnd Bergmann authored and David S. Miller committed Feb 26, 2014
1 parent 53e0b08 commit c73b1f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,8 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q)

skb = td->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;
wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait);
}
td->dev->ntxpckts--;

Expand Down Expand Up @@ -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!
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 */
interruptible_sleep_on (& vcc->close_wait);
wait_event_interruptible(vcc->close_wait, !vcc->last_skb);
}

txtp = &atm_vcc->qos.txtp;
Expand Down

0 comments on commit c73b1f6

Please sign in to comment.