isdn: avoid races in capidrv
commite48470217d1822e3566b657002c6f79bd7a77345
authorTilman Schmidt <tilman@imap.cc>
Tue, 6 Oct 2009 12:18:10 +0000 (6 12:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Oct 2009 05:20:53 +0000 (6 22:20 -0700)
tree200e267a4149e63806afda52809590a7bacf34b7
parent812d73473af23dd738afa83ab77cd6c733b3721f
isdn: avoid races in capidrv

In several places, capidrv sends a CAPI message to the ISDN
device and then updates its internal state accordingly.
If the response message from the device arrives before the
state is updated, it may be rejected or processed incorrectly.
Avoid these races by updating the state before emitting the
message.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/capi/capidrv.c