DragonFly BSD
DragonFly commits List (threaded) for 2011-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: tcp: Fix the dangling socket reference in the async sending message


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Nov 2011 17:51:00 -0800 (PST)

commit 939c81e437fba5db85fb9d7fd41b12da3f5e3752
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Wed Nov 16 09:38:27 2011 +0800

    tcp: Fix the dangling socket reference in the async sending message
    
    It is possible that tcp input path or tcp timers to drop the socket
    reference and put the socket into disconnected state, when there
    are still asynchronized sending messages pending on the netisr
    message port.  If the user space program choose to close the tcp
    socket under this situation, then the socket will be directly
    freed on the syscall path since the socket has already been
    disconnected, so the pending asynchronized sending messages on the
    netisr message port will reference freed socket, thus cause
    panic later on.
    
    Fix the problem by explicit "sync" the netisr, which could have
    pending asynchronized sending messages, before freeing the socket
    on the soclose path.

Summary of changes:
 sys/kern/uipc_socket.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/939c81e437fba5db85fb9d7fd41b12da3f5e3752


-- 
DragonFly BSD source repository



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