Module Name: src Committed By: ozaki-r Date: Thu Nov 23 07:09:20 UTC 2017
Modified Files: src/sys/netinet6: in6.c Log Message: Fix a race condition of in6_ifinit in6_ifinit checks the number of IPv6 addresses on a given interface and if it's zero (i.e., an IPv6 address being assigned to the interface is the first one), call if_addr_init. However, the actual assignment of the address (ifa_insert) is out of in6_ifinit. The check and the assignment must be done atomically. Fix it by holding in6_ifaddr_lock during in6_ifinit and ifa_insert. And also add missing pserialize to IFADDR_READER_FOREACH. To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.