[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:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10 |
URL:
<http://savannah.nongnu.org/bugs/?19168>
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
_______________________________________________________
Details:
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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wednesday 02/28/2007 at 10:19 Name: pbuf_free.patch Size: 2kB By:
dpotapov
<http://savannah.nongnu.org/bugs/download.php?file_id=12058>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?19168>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #19168] pbuf_free can cause deadlock,
Dmitry Potapov <=