[patch #5957] Safe-thread problem inside netconn_recv

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #5957] Safe-thread problem inside netconn_recv

Ondrej Lufinka

URL:
  <http://savannah.nongnu.org/patch/?5957>

                 Summary: Safe-thread problem inside netconn_recv
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: mercredi 23.05.2007 à 11:04
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In a NETCONN_TCP connection, if an TCP error happens, tcpip_thread will call
err_tcp, which post a NULL message to conn->recvmbox. When the application
side fetch the NULL message, it close the recvmbox and set it to
SYS_MBOX_NULL. It seems safer to only set the conn->err to ERR_CLSD to notify
the application, and to let it close the connection (which will "drain" any
other message in a safer way). In netconn_recv, the modification will be :

if (p == NULL) {
  memp_free(MEMP_NETBUF, buf);
  conn->err = ERR_CLSD;
  return NULL;
}






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5957>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[patch #5957] Safe-thread problem inside netconn_recv

Ondrej Lufinka

Follow-up Comment #1, patch #5957 (project lwip):

As I said on lwip-devel: I agree

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5957>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[patch #5957] Safe-thread problem inside netconn_recv

Ondrej Lufinka

Update of patch #5957 (project lwip):

                  Status:                    None => Done                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #2:

Ok, because no objects, and pretty simple, it's check in and closed.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5957>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel