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

Submitted by:  Dmitry Potapov <dpotapov>
Submitted on:  Wed 28 Feb 2007 10:19:50 AM UTC  
 
Category: pbufsSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>

 

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
  • -unavailable- added by goldsimon (Updated the item)
  • -unavailable- added by dpotapov (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 Mar 2007 11:38:22 AM UTCgoldsimonOpen/ClosedOpen=>Closed
    Sun 04 Mar 2007 05:23:40 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
    Wed 28 Feb 2007 10:19:50 AM UTCdpotapovAttached File-=>Added pbuf_free.patch, #12058

    Back to the top


    Powered by Savane 3.1-cleanup1