[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #19168] pbuf_free can cause deadlock

From: Dmitry Potapov
Subject: [lwip-devel] [bug #19168] pbuf_free can cause deadlock
Date: Wed, 28 Feb 2007 10:19:51 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070216 Firefox/


                 Summary: pbuf_free can cause deadlock
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: dpotapov
            Submitted on: Wednesday 02/28/2007 at 10:19
                Category: pbufs
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



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

As result, deadlock may happen because interrupts are disabled, so the thread
that holds semaphore will never released it.

I have attached the patch


File Attachments:

Date: Wednesday 02/28/2007 at 10:19  Name: pbuf_free.patch  Size: 2kB   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]