lkml.org 
[lkml]   [2013]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] VSOCK: Fix misc device registration
From
From: Asias He <asias@redhat.com>
Date: Wed, 24 Apr 2013 14:33:52 +0800

> 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>

Applied.


\
 
 \ /
  Last update: 2013-04-25 10:41    [W:0.166 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site