lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #23230] Bug in sys_mbox_trypost, unix port


From: Steinar Lieng Fredriksen
Subject: [lwip-devel] [bug #23230] Bug in sys_mbox_trypost, unix port
Date: Sun, 11 May 2008 12:35:53 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

URL:
  <http://savannah.nongnu.org/bugs/?23230>

                 Summary: Bug in sys_mbox_trypost, unix port
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: steinarlf
            Submitted on: Sunday 05/11/2008 at 12:35
                Category: Contrib
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 

    _______________________________________________________

Details:

If sys_mbox_trypost is called on a full sys_mbox, the function does not free
the mbox->mutex. A second sys_mbox_trypost on the same mbox will potentially
block forever. 

sys_arch.c:
(227)  if ((mbox->last + 1) >= (mbox->first + SYS_MBOX_SIZE))
(228)    return ERR_MEM;

Proposed fix:
  if ((mbox->last + 1) >= (mbox->first + SYS_MBOX_SIZE)){
    sys_sem_signal(mbox->mutex);
    return ERR_MEM;
  }




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?23230>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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