All of lore.kernel.org
 help / color / mirror / Atom feed
* BUG? Missing dput() in ovl_permissions().
@ 2016-02-16 20:00 Eric Jones
  0 siblings, 0 replies; only message in thread
From: Eric Jones @ 2016-02-16 20:00 UTC (permalink / raw)
  To: linux-unionfs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-16 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 20:00 BUG? Missing dput() in ovl_permissions() Eric Jones

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.