buglwIP - 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

Wed 28 Feb 2007 10:19:50 AM UTC, original submission:  

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

Dmitry Potapov <dpotapov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12058:  pbuf_free.patch added by dpotapov (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by dpotapov (Submitted the item)
  •  

    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/ClosedOpen Closed
    2007-03-04 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
    2007-02-28 dpotapov Attached File- Added pbuf_free.patch, #12058

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code