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:
parent
03349079fe
commit
398293a8de
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user