aemu icon indicating copy to clipboard operation
aemu copied to clipboard

Race condition in _actOnAcceptPacket

Open GoogleCodeExporter opened this issue 9 years ago • 0 comments

there is a race condition in _actOnAcceptPacket:
  _spawnLocalEvent(context, ADHOC_MATCHING_EVENT_ESTABLISHED, sendermac, 0, NULL);
  _spawnLocalEvent(context, ADHOC_MATCHING_EVENT_ACCEPT, sendermac, optlen, opt);

the events could be triggered in the wrong order (i.e. ESTABLISHED before 
ACCEPT) if the _matchingEventThread is scheduled exactly between the 2 calls: 
the event_stack is not locked and the thread could already call the event 
handler with the ESTABLISHED event before the ACCEPT gets queued.

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 7:18

GoogleCodeExporter avatar Mar 18 '15 20:03 GoogleCodeExporter