mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-31 21:06:18 +01:00
Merge r182537 from head to stable/7:
In UDPv6, reduce scope of global udbinfo lock during append to last matching socket by dropping it before udp6_append(), and remove duplicate unlocks of udbinfo and inpcb in sysctl return path. Approved by: re (kensmith)
This commit is contained in:
1 parent
67bc00ba26
commit
ea162ac5b0
1 file changed
+1
-3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/7/; revision=182737
@@ -307,9 +307,9 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
|
||||
goto badheadlocked;
|
||||
}
|
||||
INP_RLOCK(last);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
udp6_append(last, m, off, &fromsa);
|
||||
INP_RUNLOCK(last);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
return (IPPROTO_DONE);
|
||||
}
|
||||
/*
|
||||
@@ -464,8 +464,6 @@ udp6_getcred(SYSCTL_HANDLER_ARGS)
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
error = ENOENT;
|
||||
}
|
||||
INP_RUNLOCK(inp);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
if (error == 0)
|
||||
error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
|
||||
return (error);
|
||||
|
||||
Reference in new issue
Block a user