aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorAsias He <[email protected]>2013-04-23 20:33:52 +0000
committerDavid S. Miller <[email protected]>2013-04-25 04:21:22 -0400
commit6ad0b2f7fdfd95fe3107367f8aed252e94c3f654 (patch)
tree285c242b6faee9bea579b2c04d8e4b0a3deeba1a /net/unix/af_unix.c
parentc6cdcf6d82bc8f53e64ad59464e0114fe48e28bb (diff)
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" <[email protected]> Cc: Andy King <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Reilly Grant <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Asias He <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions