]> git.baikalelectronics.ru Git - kernel.git/commit
vhost/vsock: use static minor number
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 10 May 2017 14:19:18 +0000 (10:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:59:06 +0000 (16:59 +0200)
commit9a2f715e53ecc4be7ede867d58b7330282b75c19
tree1b2772f70601a954a790e19f75333dc993163ecd
parent0f1fdd7dc1a82258384bcf3db1500a80de97bec6
vhost/vsock: use static minor number

Vhost-vsock is a software device so there is no probe call that causes
the driver to register its misc char device node.  This creates a
chicken and egg problem: userspace applications must open
/dev/vhost-vsock to use the driver but the file doesn't exist until the
kernel module has been loaded.

Use the devname modalias mechanism so that /dev/vhost-vsock is created
at boot.  The vhost_vsock kernel module is automatically loaded when the
first application opens /dev/host-vsock.

Note that the "reserved for local use" range in
Documentation/admin-guide/devices.txt is incorrect.  The userio driver
already occupies part of that range.  I've updated the documentation
accordingly.

Cc: device@lanana.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/admin-guide/devices.txt
drivers/vhost/vsock.c
include/linux/miscdevice.h