mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Slide socket buffer lock earlier in sopoll() to cover the call into
selrecord(), setting up select and flagging the socker buffers as SB_SEL and setting up select under the lock.
This commit is contained in:
parent
80f0e4c265
commit
adb4cf0fbc
1 changed files with 2 additions and 2 deletions
|
|
@ -1884,15 +1884,15 @@ sopoll(struct socket *so, int events, struct ucred *active_cred,
|
|||
if (events &
|
||||
(POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM |
|
||||
POLLRDBAND)) {
|
||||
selrecord(td, &so->so_rcv.sb_sel);
|
||||
SOCKBUF_LOCK(&so->so_rcv);
|
||||
selrecord(td, &so->so_rcv.sb_sel);
|
||||
so->so_rcv.sb_flags |= SB_SEL;
|
||||
SOCKBUF_UNLOCK(&so->so_rcv);
|
||||
}
|
||||
|
||||
if (events & (POLLOUT | POLLWRNORM)) {
|
||||
selrecord(td, &so->so_snd.sb_sel);
|
||||
SOCKBUF_LOCK(&so->so_snd);
|
||||
selrecord(td, &so->so_snd.sb_sel);
|
||||
so->so_snd.sb_flags |= SB_SEL;
|
||||
SOCKBUF_UNLOCK(&so->so_snd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue