diff options
author | Karsten Keil <keil@b1-systems.de> | 2012-09-13 04:36:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-13 14:58:54 -0400 |
commit | 4b921eda53366b319602351ff4d7256fafa4bd1b (patch) | |
tree | a60091cf40391abd4eb1452dc840289bd05bfd19 /drivers/isdn/hardware/mISDN/avmfritz.c | |
parent | 930521695c183c8a4da8fe13ce231cf5263b8d98 (diff) | |
download | linux-4b921eda53366b319602351ff4d7256fafa4bd1b.tar.bz2 |
mISDN: Fix wrong usage of flush_work_sync while holding locks
It is a bad idea to hold a spinlock and call flush_work_sync.
Move the workqueue cleanup outside the spinlock and use cancel_work_sync,
on closing the channel this seems to be the more correct function.
Remove the never used and constant return value of mISDN_freebchannel.
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Cc: <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/avmfritz.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/avmfritz.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index fa6ca4733725..dceaec821b0e 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c @@ -857,8 +857,9 @@ avm_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg) switch (cmd) { case CLOSE_CHANNEL: test_and_clear_bit(FLG_OPEN, &bch->Flags); + cancel_work_sync(&bch->workq); spin_lock_irqsave(&fc->lock, flags); - mISDN_freebchannel(bch); + mISDN_clear_bchannel(bch); modehdlc(bch, ISDN_P_NONE); spin_unlock_irqrestore(&fc->lock, flags); ch->protocol = ISDN_P_NONE; |