diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-02-26 06:01:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-26 16:06:12 -0500 |
commit | c73b1f6a049d3dd0ba9d65da483483515282a5f0 (patch) | |
tree | 1575d4da7534cb10ebb4a6e2efefa536f98577e5 /drivers/atm/firestream.c | |
parent | 53e0b080bce91907fa2cb2118e7ff811998112fc (diff) |
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: 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>
Diffstat (limited to 'drivers/atm/firestream.c')
-rw-r--r-- | drivers/atm/firestream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index b41c9481b67b..f43e1c13b300 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -736,8 +736,8 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q) | |||
736 | 736 | ||
737 | skb = td->skb; | 737 | skb = td->skb; |
738 | if (skb == FS_VCC (ATM_SKB(skb)->vcc)->last_skb) { | 738 | if (skb == FS_VCC (ATM_SKB(skb)->vcc)->last_skb) { |
739 | wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait); | ||
740 | FS_VCC (ATM_SKB(skb)->vcc)->last_skb = NULL; | 739 | FS_VCC (ATM_SKB(skb)->vcc)->last_skb = NULL; |
740 | wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait); | ||
741 | } | 741 | } |
742 | td->dev->ntxpckts--; | 742 | td->dev->ntxpckts--; |
743 | 743 | ||
@@ -1123,7 +1123,7 @@ static void fs_close(struct atm_vcc *atm_vcc) | |||
1123 | this sleep_on, we'll lose any reference to these packets. Memory leak! | 1123 | this sleep_on, we'll lose any reference to these packets. Memory leak! |
1124 | On the other hand, it's awfully convenient that we can abort a "close" that | 1124 | On the other hand, it's awfully convenient that we can abort a "close" that |
1125 | is taking too long. Maybe just use non-interruptible sleep on? -- REW */ | 1125 | is taking too long. Maybe just use non-interruptible sleep on? -- REW */ |
1126 | interruptible_sleep_on (& vcc->close_wait); | 1126 | wait_event_interruptible(vcc->close_wait, !vcc->last_skb); |
1127 | } | 1127 | } |
1128 | 1128 | ||
1129 | txtp = &atm_vcc->qos.txtp; | 1129 | txtp = &atm_vcc->qos.txtp; |