All of lore.kernel.org
 help / color / mirror / Atom feed
* ovl_copy_xattr page allocation failure
@ 2014-08-19 10:50 Alexander Larsson
  0 siblings, 0 replies; only message in thread
From: Alexander Larsson @ 2014-08-19 10:50 UTC (permalink / raw)
  To: miklos; +Cc: linux-fsdevel

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).


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

only message in thread, other threads:[~2014-08-19 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 10:50 ovl_copy_xattr page allocation failure Alexander Larsson

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.