Date: Thu, 13 Oct 2016 09:37:21 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r307213 - stable/10/sys/x86/x86 Message-ID: <201610130937.u9D9bL0v065946@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu Oct 13 09:37:21 2016 New Revision: 307213 URL: https://svnweb.freebsd.org/changeset/base/307213 Log: MFC r303491: Revert r291022: x86/intr: allow mutex recursion in intr_remove_handler Sponsored by: Citrix Systems R&D Modified: stable/10/sys/x86/x86/intr_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/10/sys/x86/x86/intr_machdep.c Thu Oct 13 09:27:08 2016 (r307212) +++ stable/10/sys/x86/x86/intr_machdep.c Thu Oct 13 09:37:21 2016 (r307213) @@ -197,28 +197,19 @@ int intr_remove_handler(void *cookie) { struct intsrc *isrc; - int error, mtx_owned; + int error; isrc = intr_handler_source(cookie); error = intr_event_remove_handler(cookie); if (error == 0) { - /* - * Recursion is needed here so PICs can remove interrupts - * while resuming. It was previously not possible due to - * intr_resume holding the intr_table_lock and - * intr_remove_handler recursing on it. - */ - mtx_owned = mtx_owned(&intr_table_lock); - if (mtx_owned == 0) - mtx_lock(&intr_table_lock); + mtx_lock(&intr_table_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI); isrc->is_pic->pic_disable_intr(isrc); } intrcnt_updatename(isrc); - if (mtx_owned == 0) - mtx_unlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); } return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610130937.u9D9bL0v065946>