[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130425.042228.2204533400325888779.davem@davemloft.net>
Date: Thu, 25 Apr 2013 04:22:28 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: asias@...hat.com
Cc: netdev@...r.kernel.org, acking@...are.com, dtor@...are.com,
grantr@...are.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] VSOCK: Fix misc device registration
From: Asias He <asias@...hat.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@...emloft.net>
> Cc: Andy King <acking@...are.com>
> Cc: Dmitry Torokhov <dtor@...are.com>
> Cc: Reilly Grant <grantr@...are.com>
> Cc: netdev@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Asias He <asias@...hat.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists