From: Eric Jones <ejones@cray.com>
To: linux-unionfs@vger.kernel.org
Subject: BUG? Missing dput() in ovl_permissions().
Date: Tue, 16 Feb 2016 12:00:59 -0800 [thread overview]
Message-ID: <20160216200059.GH30731@cray.com> (raw)
I apologize for not having tested this on the latest kernel. I hit this bug in SUSE SLES12 and by inspection it still appears to be in Linus's kernel.
Failure to free dentry. Missing dput() using default_permissions in ovl_permission().
# mount overlayfs with default_permissions
mkdir l u m
mount -t tmpfs tmpfs u
mount -t overlayfs -o upperdir=u,lowerdir=l,default_permissions overlayfs m
dd if=/dev/zero of=m/test_dput bs=4096b count=1000
df u l m
rm m/test_dput
df u l m
# tmpfs space is not freed!
umount m u
# BUG. Dentry still in use!
It appears that there may be a missing dput() in the ovl_is_default_permissions(inode) path of ovl_permission().
I hit this in SUSE because default_permissions was getting set by accident due to uninitialized data in ovl_config (kalloc vs. kzalloc). This bug is fixed upstream.
-Eric Jones
reply other threads:[~2016-02-16 20:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20160216200059.GH30731@cray.com \
--to=ejones@cray.com \
--cc=linux-unionfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.