linux/net/vmw_vsock
Asias He 6ad0b2f7fd VSOCK: Fix misc device registration
When we call vsock_core_init to init VSOCK the second time,
vsock_device.minor still points to the old dynamically allocated minor
number. misc_register will allocate it for us successfully as if we were
asking for a static one. However, when other user call misc_register to
allocate a dynamic minor number, it will give the one used by
vsock_core_init(), causing this:

  [  405.470687] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xcc/0xf0()
  [  405.470689] Hardware name: OptiPlex 790
  [  405.470690] sysfs: cannot create duplicate filename '/dev/char/10:54'

Always set vsock_device.minor to MISC_DYNAMIC_MINOR before we
register.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andy King <acking@vmware.com>
Cc: Dmitry Torokhov <dtor@vmware.com>
Cc: Reilly Grant <grantr@vmware.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-25 04:21:22 -04:00
..
af_vsock.c VSOCK: Fix misc device registration 2013-04-25 04:21:22 -04:00
af_vsock.h
Kconfig
Makefile
vmci_transport_notify_qstate.c
vmci_transport_notify.c
vmci_transport_notify.h
vmci_transport.c VSOCK: vmci - fix possible info leak in vmci_transport_dgram_dequeue() 2013-04-07 16:28:02 -04:00
vmci_transport.h
vsock_addr.c VSOCK: Handle changes to the VMCI context ID. 2013-04-02 14:39:17 -04:00
vsock_addr.h VSOCK: Handle changes to the VMCI context ID. 2013-04-02 14:39:17 -04:00