buglwIP - A Lightweight TCP/IP stack - Bugs: bug #23230, Bug in sys_mbox_trypost, unix port

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #23230: Bug in sys_mbox_trypost, unix port

Submitted by:  Steinar Lieng Fredriksen <steinarlf>
Submitted on:  Sun 11 May 2008 12:35:50 PM UTC  
 
Category: ContribSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Kieran Mansley <kieranm>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.3.0

Fri 30 May 2008 11:42:02 AM UTC, comment #1:

I've checked this in, thanks for the bug report.

Resolving fixed.

Kieran Mansley <kieranm>
Project AdministratorIn charge of this item.
Sun 11 May 2008 12:35:50 PM UTC, original submission:

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;
}

Steinar Lieng Fredriksen <steinarlf>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by steinarlf (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
    Fri 30 May 2008 11:42:02 AM UTCkieranmStatusNone=>Fixed
      Assigned toNone=>kieranm
      Open/ClosedOpen=>Closed
      Planned Release=>1.3.1

    Back to the top


    Powered by Savane 3.1-cleanup1