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@.
This commit is contained in:
John Baldwin 2005-11-29 23:07:14 +00:00
parent 03349079fe
commit 398293a8de

View File

@ -716,7 +716,7 @@ sosend_copyin(struct uio *uio, struct mbuf **retmp, int atomic, long *space,
}
#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.