Print this page
11839 ipmi_close can panic trying to free invalid dev_t
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
@@ -160,11 +160,11 @@
/* exclusive opens are not supported */
if (flag & FEXCL)
return (ENOTSUP);
- if ((minor = (minor_t)id_alloc_nosleep(minor_ids)) == 0)
+ if ((minor = (minor_t)id_alloc_nosleep(minor_ids)) == (minor_t)(-1))
return (ENODEV);
/* Initialize the per file descriptor data. */
dev = kmem_zalloc(sizeof (ipmi_device_t), KM_SLEEP);