numam-dpdk/lib/librte_vhost/eventfd_link
Xiaobo Chi 7836894a64 vhost: fix kernel module insertion
Problem:if I firstly insert my kmod_test.ko, then insert eventfd_link.ko,
error will happen with hint "Device or resource busy". This is because
the default minor device number, 0, has been occupied by my kmod_test.ko .

root@distro:~/test$ lsmod
Module                  Size  Used by
kmod_test                927  0
vboxsf                 35930  4
vboxguest             222130  1 vboxsf
microcode              10315  0
autofs4                25051  0
root@distro:~/test$ insmod ./eventfd_link.ko
insmod: ERROR: could not insert module ./eventfd_link.ko: Device or
resource busy

Explanation: For miscdevices, the major device_no is same, so the minor
device_no should be set to ditinguish different misc devices;  if not set
the minor, it may fail while insmod due to the default minor value, 0, has
been used by other miscdevice. MISC_DYNAMIC_MINOR means to let Linux
kernel dynamically assign one minor devide number while loading.

Signed-off-by: Xiaobo Chi <xiaobo.chi@nokia.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-24 21:34:11 +01:00
..
eventfd_link.c vhost: fix kernel module insertion 2015-11-24 21:34:11 +01:00
eventfd_link.h vhost: add new eventfd copy ioctl 2015-10-30 20:06:30 +01:00
Makefile vhost: build eventfd_link module against specified kernel 2015-09-24 22:01:53 +02:00