ozaki-r 99ec0af5eb Store IFF_ALLMULTI in ec_flags instead of if_flags to avoid data races
IFF_ALLMULTI is set/unset to if_flags via if_mcast_op.  To avoid data races on
if_flags, IFNET_LOCK was added for if_mcast_op.  Unfortunately it produces
a deadlock so we want to remove added IFNET_LOCK by avoiding the data races by
another approach.

This fix introduces ec_flags to struct ethercom and stores IFF_ALLMULTI to it.
ec_flags is protected by ETHER_LOCK and thus IFNET_LOCK is no longer necessary
for if_mcast_op.  Note that the fix is applied only to MP-safe drivers that
the data races matter.

In the kernel, IFF_ALLMULTI is set by a driver and used by the driver itself.
So changing the storing place doesn't break anything.  One exception is
ioctl(SIOCGIFFLAGS); we have to include IFF_ALLMULTI in a result if needed to
export the flag as well as before.

A upcoming commit will remove IFNET_LOCK.

PR kern/54189
2019-05-15 02:56:47 +00:00
..
2019-04-11 14:38:05 +00:00
2019-02-26 10:30:28 +00:00
2019-01-20 23:36:57 +00:00
2018-12-12 01:40:20 +00:00
2018-12-12 01:40:20 +00:00
2018-12-12 01:46:47 +00:00
2019-04-30 20:55:41 +00:00
2019-02-26 09:43:37 +00:00
2019-05-10 06:33:14 +00:00
2019-03-18 11:38:03 +00:00
2019-04-06 08:38:23 +00:00