buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49863, Data race in...

 
 

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

bug #49863: Data race in netconn_gethostbyname()

Submitted by:  Thomas Mueller <tmu>
Submitted on:  Fri 16 Dec 2016 01:35:03 PM UTC  
 
Category: DNSSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: 2.0.1
lwIP version: 2.0.0

Fri 16 Dec 2016 02:44:31 PM UTC, comment #1:

Right. Thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 16 Dec 2016 01:35:03 PM UTC, original submission:

Function netconn_gethostbyname() uses tcpip_callback() to
execute lwip_netconn_do_gethostbyname() in the context
of tcpip_thread. In configurations with LWIP_MPU_COMPATIBLE=0
netconn_gethostbyname() passes the address of local variable
'err' in the argument to function lwip_netconn_do_gethostbyname()
Variable 'err' is also used to store the return value of tcpip_callback().

Depending on scheduling policies and priorities, the function
to be executed by the tcpip_thread may have completed before
function tcpip_callback() returns and storing the return value
of tcpip_callback() in 'err' will overwrite the value returned
by lwip_netconn_do_gethostbyname().

Using a separate local variable to store the return value of
tcpip_callback() resolves the issue.

Thomas Mueller <tmu>

 

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 goldsimon (Posted a comment)
  • -unavailable- added by tmu (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 16 Dec 2016 02:44:31 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.0.1

    Back to the top


    Powered by Savane 3.1-cleanup1