From: rabin@rab.in (Rabin Vincent)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: DMA: Fix kzalloc flags in __dma_alloc
Date: Fri, 18 Mar 2016 11:38:29 +0100 [thread overview]
Message-ID: <20160318103829.GA15201@lnxrabinv.se.axis.com> (raw)
In-Reply-To: <1458293329-5519-1-git-send-email-acourbot@nvidia.com>
On Fri, Mar 18, 2016 at 06:28:49PM +0900, Alexandre Courbot wrote:
> Commit 19e6e5e5392b ("ARM: 8547/1: dma-mapping: store buffer
> information") allocates a structure meant for internal buffer management
> with the GFP flags of the buffer itself. This can trigger the following
> safeguard in the slab/slub allocator:
>
> if (unlikely(flags & GFP_SLAB_BUG_MASK)) {
> pr_emerg("gfp: %u\n", flags & GFP_SLAB_BUG_MASK);
> BUG();
> }
>
> Fix this by filtering the flags that make the slab allocator unhappy.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> Cc: Rabin Vincent <rabin@rab.in>
> ---
> Changes since v1:
> - Filter flags that may cause problem instead of forcing GFP_KERNEL
> (and risk sleeping in atomic context), as suggested by Rabin.
Acked-by: Rabin Vincent <rabin@rab.in>
Thanks.
next prev parent reply other threads:[~2016-03-18 10:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 9:28 [PATCH v2] ARM: DMA: Fix kzalloc flags in __dma_alloc Alexandre Courbot
2016-03-18 10:38 ` Rabin Vincent [this message]
2016-03-18 10:58 ` Russell King - ARM Linux
2016-03-20 6:49 ` Alexandre Courbot
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=20160318103829.GA15201@lnxrabinv.se.axis.com \
--to=rabin@rab.in \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).