Hold SOCK_LOCK(so) while frobbing so_options. Note that while the
local race is corrected, there's still a global race in sosend() relating to so_options and the SO_DONTROUTE flag.
This commit is contained in:
parent
a5de0db8b5
commit
7b574f2e45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130668
@ -778,8 +778,11 @@ sosend(so, addr, uio, top, control, flags, td)
|
||||
(resid > 0 && space > 0) ? PRUS_MORETOCOME : 0,
|
||||
top, addr, control, td);
|
||||
splx(s);
|
||||
if (dontroute)
|
||||
if (dontroute) {
|
||||
SOCK_LOCK(so);
|
||||
so->so_options &= ~SO_DONTROUTE;
|
||||
SOCK_UNLOCK(so);
|
||||
}
|
||||
clen = 0;
|
||||
control = NULL;
|
||||
top = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user