public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Fischer, Anna" <anna.fischer@hp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Duplicate SYSFS entries???
Date: Fri, 25 Apr 2008 21:57:12 -0700	[thread overview]
Message-ID: <20080426045712.GA17426@kroah.com> (raw)
In-Reply-To: <38CBA1F6A350B044AF785E63AAC3C6776497AFEB5C@G5W0276.americas.hpqcorp.net>

On Tue, Apr 22, 2008 at 04:06:02PM +0000, Fischer, Anna wrote:
> I'm creating a SYSFS hierarchy that consists of several symlinks that
> I'm generating by calling sysfs_create_link(). However, I realized
> that when I'm calling this with a link name that is already in the
> directory, I actually don't get an error back but the kernel creates
> another symlink with the same name, but the destination of the link is
> arbitrary. For example, this has created the following structure under
> SYSFS on my system:
> 
> ls -l /X
> 
> total 0
> lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:13:21:1f:2d:35 -> ../../../vnetmod/vms/vm0
> lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
> lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
> lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
> lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
> 
> 
> Actually, I have created the symlinks with different target
> directories but they all (obviously) point to the same one (vm13).
> Shouldn't the kernel return an error code and disallow the creation of
> multiple files (or symlinks) with the same name in the same
> directory??
> 
> I'm running kernel version 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux.

2.6.16 is over 2 years old.  This issue has been fixed in the thousands
of changes since then :)

Please upgrade.

greg k-h

      reply	other threads:[~2008-04-26  4:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 16:06 Duplicate SYSFS entries??? Fischer, Anna
2008-04-26  4:57 ` Greg KH [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=20080426045712.GA17426@kroah.com \
    --to=greg@kroah.com \
    --cc=anna.fischer@hp.com \
    --cc=linux-kernel@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