From: Alexander Larsson <alexl@redhat.com>
To: miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org
Subject: ovl_copy_xattr page allocation failure
Date: Tue, 19 Aug 2014 12:50:10 +0200 [thread overview]
Message-ID: <1408445410.29096.9.camel@redhat.com> (raw)
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).
reply other threads:[~2014-08-19 10:50 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=1408445410.29096.9.camel@redhat.com \
--to=alexl@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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.