lwIP - A Lightweight TCP/IP stack - Bugs: bug #19168, pbuf_free can cause deadlock
You are not allowed to post comments on this tracker with your current authentication level.
bug #19168: pbuf_free can cause deadlock
Submitter: | Dmitry Potapov <dpotapov> | ||
Submitted: | Wed 28 Feb 2007 10:19:50 AM UTC | ||
Category: | pbufs | Severity: | 3 - Normal |
Item Group: | Crash Error | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | None |
Attached Files
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-03-05 | goldsimon | Open/Closed | Open | Closed | |
2007-03-04 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon | |||
2007-02-28 | dpotapov | Attached File | - | Added pbuf_free.patch, #12058 |
Powered by Savane 3.13-d3ae.
Corresponding source code
pbuf_free uses SYS_ARCH_PROTECT at the beginning, which could be implemented by disabling interrupts for an embedded system, after that it calls either PBUF_POOL_FREE(), or memp_free(), or mem_free().
mem_free() always calls to sys_sem_wait(mem_sem);
PBUF_POOL_FREE() and memp_free() uses sys_sem_wait() if
SYS_LIGHTWEIGHT_PROT = 0
As result, deadlock may happen because interrupts are disabled, so the thread that holds semaphore will never released it.
I have attached the patch