lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070731152526.0e21e234@gondolin.boeblingen.de.ibm.com>
Date:	Tue, 31 Jul 2007 15:25:26 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Tejun Heo <htejun@...il.com>
Cc:	ebiederm@...ssion.com, gregkh@...e.de,
	linux-kernel@...r.kernel.org, satyam@...radead.org,
	stern@...land.harvard.edu
Subject: Re: [PATCH 6/7] sysfs: make sysfs_add_one() automatically check for
 duplicate entry

On Tue, 31 Jul 2007 19:15:08 +0900,
Tejun Heo <htejun@...il.com> wrote:

> Make sysfs_add_one() check for duplicate entry and return -EEXIST if
> such entry exists.  This simplifies node addition code a bit.
> 
> This patch doesn't introduce any noticeable behavior change.
> 
> Signed-off-by: Tejun Heo <htejun@...il.com>
> ---
>  fs/sysfs/dir.c     |   25 ++++++++++++++++---------
>  fs/sysfs/file.c    |   12 +++++-------
>  fs/sysfs/symlink.c |    9 +++------
>  fs/sysfs/sysfs.h   |    2 +-
>  4 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index 8ce3ffb..69e57be 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -491,9 +491,15 @@ void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
>   *
>   *	LOCKING:
>   *	Determined by sysfs_addrm_start().
> + *
> + *	RETURNS:
> + *	0 on success, -errno on failure.

The only possible failure is -EEXIST, so I'd state that explicitly,
especially since you rely on that fact below.

Otherwise
Acked-by: Cornelia Huck <cornelia.huck@...ibm.com>
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ