summaryrefslogtreecommitdiff
path: root/lib/lua/sqlite/sqlite.c
diff options
context:
space:
mode:
authorozaki-r <ozaki-r@NetBSD.org>2019-05-15 02:56:47 +0000
committerozaki-r <ozaki-r@NetBSD.org>2019-05-15 02:56:47 +0000
commit81d706b55f20c4ab780cf07255a8668b79c79e6c (patch)
treedc83c0139da06d2bc9f6b2352a7e193bfd1cda7e /lib/lua/sqlite/sqlite.c
parent6440ced3181a006aa097f599657f62b5d6255554 (diff)
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
Diffstat (limited to 'lib/lua/sqlite/sqlite.c')
0 files changed, 0 insertions, 0 deletions