diff options
author | jhb <jhb@FreeBSD.org> | 2005-11-29 23:07:14 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-11-29 23:07:14 +0000 |
commit | 4b322c88f271446c44c3cda0b607467e7e34b4aa (patch) | |
tree | ecc01d47041501b7601dec4aac59e867aa661b47 | |
parent | bf85e6f24581fb7ed9092f663ae000d45cf5cd1c (diff) | |
download | FreeBSD-src-4b322c88f271446c44c3cda0b607467e7e34b4aa.zip FreeBSD-src-4b322c88f271446c44c3cda0b607467e7e34b4aa.tar.gz |
Fix snderr() to not leak the socket buffer lock if an error occurs in
sosend(). Robert accidentally changed the snderr() macro to jump to the
out label which assumes the lock is already released rather than the
release label which drops the lock in his previous change to sosend().
This should fix the recent panics about returning from write(2) with the
socket lock held and the most recent LOR on current@.
-rw-r--r-- | sys/kern/uipc_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index baecd19..446a171 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -716,7 +716,7 @@ out: } #define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK) -#define snderr(errno) { error = (errno); goto out; } +#define snderr(errno) { error = (errno); goto release; } /* * Send on a socket. |