panic: make_dev_credv: bad si_name (error=17, si_name=dri/card0)

Architecture: i386 v2
Length: 93831168B (89 MB)
Blocksize: 512
Dumptime: Tue Apr 22 23:14:25 2014
Version String: FreeBSD 10.0-STABLE #0 r264725: Tue Apr 22 22:27:39 EST 2014

Postmortem analysis has determined that this panic occurred at frame 3, in function make_dev_credv (in kern/kern_conf.c). This resulted from a bus reprobe request triggered by the loading of the i915kms.ko module using the KLD framework.

As i915drm was already compiled into the running kernel (inara#0, stable/10@264725), a device dri/card0 already existed at the point where DRM code in i915kms was initialised. This initialisation attempts to create device entries for all DRIs with no protection against DRIs being created for already-existing cards.

make_dev_credv ensures that device names in /dev are unique upon their creation. This particular panic is triggered by a non-unique device name in /dev (error 17, EEXIST), as a result of this module conflict.

Suggested fix: