diff options
author | 2007-07-05 09:04:04 +0000 | |
---|---|---|
committer | 2007-07-05 09:04:04 +0000 | |
commit | fb35573080e1454c383856931f0bbf75062fbe6d (patch) | |
tree | c0903b5d1ff756877235be73a63ddd8c7017c210 | |
parent | Compute the correct address and try and print a matching symbol for j and (diff) | |
download | wireguard-openbsd-fb35573080e1454c383856931f0bbf75062fbe6d.tar.xz wireguard-openbsd-fb35573080e1454c383856931f0bbf75062fbe6d.zip |
From FreeBSD:
Fix a bug in sblock() that has existed since revision 1.1 from BSD:
correctly return an error if M_NOWAIT is passed to sblock() and the
operation might block. This remarkably subtle macro bug appears to
be responsible for quite a few undiagnosed socket buffer corruption
and mbuf-related kernel panics.
"diff is correct" todd@, "should go in asap" markus@
-rw-r--r-- | sys/sys/socketvar.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 99fe1142771..ad4a935f4d2 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socketvar.h,v 1.39 2007/02/26 23:53:33 kurt Exp $ */ +/* $OpenBSD: socketvar.h,v 1.40 2007/07/05 09:04:04 dim Exp $ */ /* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */ /*- @@ -204,7 +204,7 @@ do { \ */ #define sblock(sb, wf) ((sb)->sb_flags & SB_LOCK ? \ (((wf) == M_WAITOK) ? sb_lock(sb) : EWOULDBLOCK) : \ - ((sb)->sb_flags |= SB_LOCK), 0) + ((sb)->sb_flags |= SB_LOCK, 0)) /* release lock on sockbuf sb */ #define sbunlock(sb) { \ |