]> git.baikalelectronics.ru Git - kernel.git/commit
isdn: pcbit: fix interruptible_sleep_on race
authorArnd Bergmann <arnd@arndb.de>
Wed, 26 Feb 2014 11:01:52 +0000 (12:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 21:06:12 +0000 (16:06 -0500)
commita54b08f4a700b7cea0f9c9f75fa3da7b46f74b4d
treea8c1d220dd2e18c085541e6978cbccc0e0e2c180
parentdad6d5ac97b7ab6e2a988109ca3476cc39dc52b5
isdn: pcbit: fix interruptible_sleep_on race

interruptible_sleep_on is racy and going away. In case of pcbit,
the driver would run into a timeout if the card is initialized
before we start waiting for it. This uses wait_event to fix the
race. In order to do this, the state machine handling for the
timeout case has to get trivially reorganized so we actually know
whether the timeout has occorred or not.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/pcbit/drv.c