Ticket #124 (closed defect: fixed)
batman-adv 0.2-alpha: possible[tm] regression in packet aggregation
| Reported by: | simon | Owned by: | somebody |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | general | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Assume we have 2 "threads":
Thread1:
add_packet_list()
-> set_outstanding_packets_timer()
calls spin_trylock(&packets_timer_lock), acquires the lock, and calls
-> cancel_delayed_work_sync(&send_outstanding_packets_wq);
Thread 2:
Workqueue threads, calls
-> set_oustanding_packets()
Assumption:
Thread 2 jumps between the spin_trylock() and cancel_delayed_work_sync(). Then Thread 1 holds, Thread 2 tries to acquire it and waits. Thread 1 then waits for Thread 2 to complete within cancel_delayed_work_sync(). This is a deadlock/lifelock.
Its not very likely that it happens, but it might happen, so i'm opening this ticket. ;)
Change History
Note: See
TracTickets for help on using
tickets.
