diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:38:47 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:38:47 +0000 |
commit | 032f856b7e43797099a3da43a7a1096544d6989b (patch) | |
tree | 557860d8c11942f46f8f58820680c32a8f41a8a0 /sys/netipx | |
parent | 07800ca5f17122964aa91b60bd676029e99eba3e (diff) | |
download | FreeBSD-src-032f856b7e43797099a3da43a7a1096544d6989b.zip FreeBSD-src-032f856b7e43797099a3da43a7a1096544d6989b.tar.gz |
Acquire the socket buffer receive lock in spx_rcvoob() to permit
multiple reads of receive buffer state to be performed atomically.
Diffstat (limited to 'sys/netipx')
-rw-r--r-- | sys/netipx/spx_usrreq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index b16c2a7..68e352c 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -1527,12 +1527,15 @@ spx_rcvoob(so, m, flags) ipxp = sotoipxpcb(so); cb = ipxtospxpcb(ipxp); + SOCKBUF_LOCK(&so->so_rcv); if ((cb->s_oobflags & SF_IOOB) || so->so_oobmark || (so->so_rcv.sb_state & SBS_RCVATMARK)) { + SOCKBUF_UNLOCK(&so->so_rcv); m->m_len = 1; *mtod(m, caddr_t) = cb->s_iobc; return (0); } + SOCKBUF_UNLOCK(&so->so_rcv); return (EINVAL); } |