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]
Date:	Mon, 2 Jun 2008 17:53:01 +0200
From:	Jan Kara <jack@...e.cz>
To:	Vegard Nossum <vegard.nossum@...il.com>
Cc:	linux-kernel@...r.kernel.org, Pavel Emelyanov <xemul@...nvz.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: find: WARNING: Hard link count is wrong for /proc/1

> On Mon, Jun 2, 2008 at 8:31 AM, Vegard Nossum <vegard.nossum@...il.com> wrote:
> > Hi,
> >
> > 2.6.26-rc4 seems to exhibit the following (new since at least 2.6.24)
> > warning when running find /proc/1:
> >
> > find: WARNING: Hard link count is wrong for /proc/1: this may be a bug
> > in your filesystem driver.  Automatically turning on find's -noleaf
> > option.  Earlier results may have failed to include directories that
> > should have been searched.
> 
> My prime suspect is
> 
> commit e9720acd728a46cb40daa52c99a979f7c4ff195c
> Author: Pavel Emelyanov <xemul@...nvz.org>
> Date:   Fri Mar 7 11:08:40 2008 -0800
> 
>     [NET]: Make /proc/net a symlink on /proc/self/net (v3)
> 
> 
> as this patch introduces a new directory entry without bumping the nlink count.
> 
> Will this do? (Untested)
> 
> Vegard
> 
> 
> >From a43ef05a8c1f8d45ca88e00fdd31c00ddfdba1b8 Mon Sep 17 00:00:00 2001
> From: Vegard Nossum <vegard.nossum@...il.com>
> Date: Mon, 2 Jun 2008 08:57:45 +0200
> Subject: [PATCH] proc: fix /proc/<pid> link count
> 
> commit e9720acd728a46cb40daa52c99a979f7c4ff195c
> Author: Pavel Emelyanov <xemul@...nvz.org>
> Date:   Fri Mar 7 11:08:40 2008 -0800
> 
>     [NET]: Make /proc/net a symlink on /proc/self/net (v3)
> 
> introduced /proc/net without bumping the link count on /proc/self.
  Looks fine to me :).

								Honza
> Signed-off-by: Vegard Nossum <vegard.nossum@...il.com>
> ---
>  fs/proc/base.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index c447e07..10ee4a2 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2589,6 +2589,9 @@ static struct dentry
> *proc_pid_instantiate(struct inode *dir,
>  #ifdef CONFIG_SECURITY
>  	inode->i_nlink += 1;
>  #endif
> +#ifdef CONFIG_NET
> +	inode->i_nlink += 1;
> +#endif
> 
>  	dentry->d_op = &pid_dentry_operations;
> 
-- 
Jan Kara <jack@...e.cz>
SuSE CR Labs
--
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