Date: Fri, 22 Sep 2017 12:18:48 +0000 From: "mav (Alexander Motin)" <phabric-noreply@FreeBSD.org> To: freebsd-net@freebsd.org Subject: [Differential] D12457: Complete INADDR_HASH lock protection Message-ID: <ecac05ddc614f4cc701d315d249ab234@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-em3ftishzefmzreicm43-req@FreeBSD.org> References: <differential-rev-PHID-DREV-em3ftishzefmzreicm43-req@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
mav added inline comments. INLINE COMMENTS > if_stf.c:383 > break; > + IN_IFADDR_RUNLOCK(&in_ifa_tracker); > if (ia4 == NULL) Wouldn't it be better to use in_localip() here instead of code duplication? Or I miss something? > in_mcast.c:1383 > + IN_IFADDR_RUNLOCK(&in_ifa_tracker); > + } > if (sopt->sopt_name == IP_BLOCK_SOURCE) Do I miss some other protection means or this and few below places just scream about possible races due to missing interface pointer pulled out of the lock without taking reference? I suspect INADDR_TO_IFP KPI is not safe now in general. > ip_input.c:697 > } > - /* IN_IFADDR_RUNLOCK(); */ > + IN_IFADDR_RUNLOCK(&in_ifa_tracker); > Looking on r194951 commit message and later r286001 commit this should be uncommented now, but comments from active networking people are welcome. REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D12457 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: eugen_grosbein.net, ae, avg, mav, rwatson Cc: imp, freebsd-net-list
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ecac05ddc614f4cc701d315d249ab234>
