Date: Thu, 23 Oct 2014 19:06:08 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273555 - head/sys/kern Message-ID: <201410231906.s9NJ68CJ002294@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Oct 23 19:06:08 2014 New Revision: 273555 URL: https://svnweb.freebsd.org/changeset/base/273555 Log: In selfdfree re-evaulate sf_si after takin the lock. Otherwise we can race with doselwakeup. This is a fixup to r273549 Reviewed by: jhb Reported by: everyone and their dog Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Thu Oct 23 18:50:44 2014 (r273554) +++ head/sys/kern/sys_generic.c Thu Oct 23 19:06:08 2014 (r273555) @@ -1602,7 +1602,8 @@ selfdfree(struct seltd *stp, struct self STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link); if (sfp->sf_si != NULL) { mtx_lock(sfp->sf_mtx); - TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); + if (sfp->sf_si != NULL) + TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); mtx_unlock(sfp->sf_mtx); } uma_zfree(selfd_zone, sfp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410231906.s9NJ68CJ002294>