mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: asias@redhat.com
Cc: netdev@vger.kernel.org, acking@vmware.com, dtor@vmware.com,
	grantr@vmware.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VSOCK: Fix misc device registration
Date: Thu, 25 Apr 2013 04:22:28 -0400 (EDT)	[thread overview]
Message-ID: <20130425.042228.2204533400325888779.davem@davemloft.net> (raw)
In-Reply-To: <1366785232-15653-1-git-send-email-asias@redhat.com>

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.

      parent reply	other threads:[~2013-04-25  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24  6:33 Asias He
2013-04-24 15:38 ` Dmitry Torokhov
2013-04-25  8:22 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130425.042228.2204533400325888779.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=acking@vmware.com \
    --cc=asias@redhat.com \
    --cc=dtor@vmware.com \
    --cc=grantr@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®