diff options
author | marius <marius@FreeBSD.org> | 2009-12-24 15:40:08 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2009-12-24 15:40:08 +0000 |
commit | abc427b39dad4b81dbaf7260d7a22505332233fd (patch) | |
tree | b988f0de3a59b5035bf64cb08b0bfa8895ed8e4d | |
parent | 77111865f4a5b2befae60592bd1525c1caf42f99 (diff) | |
download | FreeBSD-src-abc427b39dad4b81dbaf7260d7a22505332233fd.zip FreeBSD-src-abc427b39dad4b81dbaf7260d7a22505332233fd.tar.gz |
Add missing locking in intr_bind().
-rw-r--r-- | sys/sparc64/sparc64/intr_machdep.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/intr_machdep.c b/sys/sparc64/sparc64/intr_machdep.c index d0174b9..f47ad0e 100644 --- a/sys/sparc64/sparc64/intr_machdep.c +++ b/sys/sparc64/sparc64/intr_machdep.c @@ -450,13 +450,19 @@ int intr_bind(int vec, u_char cpu) { struct intr_vector *iv; + int error; if (vec < 0 || vec >= IV_MAX) return (EINVAL); + sx_xlock(&intr_table_lock); iv = &intr_vectors[vec]; - if (iv == NULL) + if (iv == NULL) { + sx_xunlock(&intr_table_lock); return (EINVAL); - return (intr_event_bind(iv->iv_event, cpu)); + } + error = intr_event_bind(iv->iv_event, cpu); + sx_xunlock(&intr_table_lock); + return (error); } /* |