Fix lock order reversal in nd6_na_input().
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 20076 Build 19575: arc lint + arc unit
Event Timeline
| sys/netinet6/nd6_nbr.c | ||
|---|---|---|
| 639 | These can be of type bool. removed_defrouter is redundant, you can just initialize dr = NULL and test it. | |
| 747 | It is rather unfortunate that we have to take a global (well, vnet-global) lock for every NA. :( | |
| 885 | It can be a bit simpler: dr = defrouter_lookup_locked(...);
if (dr != NULL) {
...
} else if ((ND_IFINFO(nd6_ifp)->flags & ND6_IFF_ACCEPT_RTADV) != 0) {
....
} | |
| 910 | This can be: if (nd6_locked) {
ND6_WUNLOCK();
if (dr != NULL) {
...
}
} | |
This comment was removed by darrick.freebsd_gmail.com.