]> git.baikalelectronics.ru Git - kernel.git/commit
caif-hsi: Fix for wakeup condition problem
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Thu, 13 Oct 2011 11:29:24 +0000 (11:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 07:25:41 +0000 (03:25 -0400)
commitf1d2c9a7adb9455efacb1ea245fbe79dc1402d92
tree3fc3b0f7160c9f9659eed18721b6770468def367
parentbe1ca4f2f0ba4428d472654784efab4bc320c5ee
caif-hsi: Fix for wakeup condition problem

Under stressed conditions a race could happen when del_timer_sync() was called
from softirq context at the same time when mod_timer_pending() for the same
timer was called from the workqueue. This leaded to a state mismatch in the
CAIF HSI driver and following unexpected link wakeup procedure.

The fix puts del_timer_sync() and mod_timer_pending() calls under a spin lock
to protect against the race condition.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_hsi.c