Fix for missing timer wait wakeups
The guard counter should be the pre-incremented count as that serves
as the 'target' count to identify when the callout is actually
completed (via done_ctr). If the callout completes during the lock
switch, no wait is required. Not sure how this ever worked before...
@@ -173,7 +173,7 @@ sctp_os_timer_stop(sctp_os_timer_t *c)
} else {
/* need to wait until the callout is finished */
sctp_os_timer_waiting = 1;
- wakeup_cookie = sctp_os_timer_wait_ctr++;
+ wakeup_cookie = ++sctp_os_timer_wait_ctr;
SCTP_TIMERQ_UNLOCK();
SCTP_TIMERWAIT_LOCK();
/*
