mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven French <sfrench@us.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Martin Josefsson <gandalf@wlug.westbo.se>, linux-kernel@vger.kernel.org
Subject: Re: cifs leaks memory like crazy in 2.5.61
Date: Thu, 20 Feb 2003 15:21:10 -0600	[thread overview]
Message-ID: <OF1FF77D10.CC70C61D-ON87256CD3.006C555B@us.ibm.com> (raw)





Fixed now.

The obvious warning message that Martin noted (on kmem_cache_free of
the request buffers when the cifs module was unloaded) turned out
to be a sideffect of the global kernel change for masking signals for
users of daemonize that went in about 10 days ago.   With signals now
masked by default, the cifsd captive thread was not exiting fully at
unmount time leaving an unused buffer at rmmod time.   With Andrew Morton's
recent exports, the cifs vfs can be built as a module again so the fix will
be timely (since others would be likely to notice it).    The fix is
changeset
1.1004 at http://cifs.bkbits.net/linux-2.5cifs

The unrelated 64 byte object allocation growth in the slab cache turns out
to
have been around for quite a long time and was caused by a path in
which file->private_data was reallocated when search rewinding
occured (which "ls -R" does).   The file->private_data field is freed on
release in cifs_closedir but in this path it could be allocated more than
once
when (specifically when rewind of file->f_pos occurred to the second search
entry when readdir was reinvoked).   I found this while rechecking all the
kmalloc
invocations in the cifs vfs today.    This particular case (readdir
handles)  was
not instrumented with a counter  as many of the other memory alloctions
are.
I will post this fix later today.   In retrospect this reminds me of bugs
in various
filesystems and network servers generated by that other OS's "tree" utility
which also did search rewind.

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench@us.ibm.com


             reply	other threads:[~2003-02-20 21:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 21:21 Steven French [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-20 16:56 Steven French
2003-02-20 17:16 ` Jeff Garzik
2003-02-20 16:28 Steven French
2003-02-20 16:45 ` Jeff Garzik
2003-02-20 13:28 Martin Josefsson

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=OF1FF77D10.CC70C61D-ON87256CD3.006C555B@us.ibm.com \
    --to=sfrench@us.ibm.com \
    --cc=gandalf@wlug.westbo.se \
    --cc=jgarzik@pobox.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

all inboxes | Powered by JetHome®