Return EINVAL if the passed intr is out of bounds.

PR: 30857
Submitted by: David Xu <davidx@viasoft.com.cn>
MFC: 1 week
This commit is contained in:
jlemon 2001-09-27 02:46:47 +00:00
parent bc122022f9
commit ebe90110b6
4 changed files with 4 additions and 0 deletions

View File

@ -480,6 +480,7 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
#else
if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
#endif /* APIC_IO */
return (EINVAL);
if (intr_handler[intr] != isa_strayintr)
return (EBUSY);

View File

@ -480,6 +480,7 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
#else
if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
#endif /* APIC_IO */
return (EINVAL);
if (intr_handler[intr] != isa_strayintr)
return (EBUSY);

View File

@ -480,6 +480,7 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
#else
if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
#endif /* APIC_IO */
return (EINVAL);
if (intr_handler[intr] != isa_strayintr)
return (EBUSY);

View File

@ -480,6 +480,7 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
#else
if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
#endif /* APIC_IO */
return (EINVAL);
if (intr_handler[intr] != isa_strayintr)
return (EBUSY);