Re: [bug-2.3.99-pre7-8] running fuser leaks mnt_count of /proc

From: Alexander Viro (aviro@redhat.com)
Date: Tue May 09 2000 - 15:34:58 EST


On Tue, 9 May 2000, Alexander Viro wrote:
>
> On Tue, 9 May 2000, Tigran Aivazian wrote:
>
> > On Tue, 9 May 2000, Alexander Viro wrote:
> > >
> > > On Tue, 9 May 2000, Tigran Aivazian wrote:
> > >
> > > > Hi guys,
> > > >
> > > > Just try runnning fuser (on any filesystem) and watch the mnt->mnt_count
> > > > of /proc (of the real entry, not the kern_mounted one) grow steadily by
> > > > one each time.
> > >
> > > How quaint... chdir("/proc/self/fd"); gets the process into the state
> > > where it will correctly deal with further chdir() calls, but fail to
> > > release fs_struct (contents?) upon the exit. It looks like a change of
> > > some state: been there once and that's it - you are doomed. WTF???
> > > More coffee needed - it's getting seriously weird...
> > >
> > >
> > very interesting - now that you narrowed it down I'll look closer as
> > well..
>
> Update: it pretty much looks like chdir("/proc/<n>/fd"); bumps the reference
> counter on fs_struct of process in question.

And one more update:

Tigran, could you try to add put_fs_struct() into proc_root_link()? (same as
in proc_cwd_link()). I'm not on a Linux box right now (OK, not on a box I
could reboot), so... That _is_ a leak, all right, but I wonder whether it's
our leak...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:14 EST