If a system has dynamic ever changing set of IP addresses, it can panic due to unprotected access to global INADDR_HASH in several kernel subsystems: ip_input.c, in_mcast.c, if_stf(4).
There was also similar problem in ip_fw2.c fixed recently in head by ae@.
kgdb showed "(struct in_ifaddr *) 0xdeadc0dedeadc0de" for a panic in INVARIANTS-enabled kernel (PR #220078).
I could provoke such panic in ipfw with my stress-test for net/mpd5 creating/deleting hundreds of ngXXX interfaces having distinct IP addresses.
Proposed change makes use of existing IN_IFADDR_[RW]LOCK macros to protect access to the set as they are already used in the ip_icmp.c, if_ether.c and in.c.