ovl_copy_xattr page allocation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using overlayfs I pretty quickly run into a "page allocation
failure: order:4, mode:0x40d0" that looks like this:

Call Trace:
[<ffffffff8171c149>] dump_stack+0x45/0x56
[<ffffffff811898af>] warn_alloc_failed+0xff/0x170
[<ffffffff8118da65>] __alloc_pages_nodemask+0x6e5/0xbf0
[<ffffffff811d3ee1>] alloc_pages_current+0xb1/0x160
[<ffffffff81189a4b>] alloc_kmem_pages+0x3b/0x110
[<ffffffff811a8418>] kmalloc_order+0x18/0x50
[<ffffffff811a8474>] kmalloc_order_trace+0x24/0xa0
[<ffffffffa064040a>] ? ovl_copy_xattr+0x6a/0x170 [overlayf
[<ffffffffa064042b>] ovl_copy_xattr+0x8b/0x170 [overlayfs]
[<ffffffffa063de28>] ? ovl_create_real+0x108/0x240 [overla
[<ffffffffa064094e>] ovl_copy_up_one+0x33e/0x7f0 [overlayf
[<ffffffff813041ed>] ? selinux_sem_alloc_security+0x7d/0xd
[<ffffffffa0640ee9>] ovl_copy_up+0xe9/0x120 [overlayfs]
[<ffffffffa063ec01>] ovl_do_remove+0x81/0x4a0 [overlayfs]
[<ffffffff81303223>] ? may_link.isra.31+0x93/0x120
[<ffffffff812089da>] ? __inode_permission+0x4a/0xc0
[<ffffffffa063f053>] ovl_unlink+0x13/0x20 [overlayfs]
[<ffffffff812096d6>] vfs_unlink+0xe6/0x160
[<ffffffff8120f51e>] do_unlinkat+0x27e/0x2f0
[<ffffffff81210646>] SyS_unlink+0x16/0x20
[<ffffffff81722fe9>] system_call_fastpath+0x16/0x1b

This seems to be from
  value = kmalloc(XATTR_SIZE_MAX, GFP_KERNEL);
in ovl_copy_xattr().

XATTR_SIZE_MAX is 64k, so its probably a bad idea to always allocate
this GFP_KERNEL. We should probably start with a small stack-allocated
buffer and then only allocate what is required.

Note: The reason I hit this is probably due to selinux, which ensure
that most files have an xattr (the selinux context).

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux