linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zeng Tao <prime.zeng@hisilicon.com>
To: <labbott@redhat.com>, <sumit.semwal@linaro.org>,
	<gregkh@linuxfoundation.org>, <arve@android.com>,
	<tkjos@android.com>, <maco@android.com>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
	<puck.chen@hisilicon.com>
Subject: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting
Date: Tue, 9 Jan 2018 18:43:43 +0800	[thread overview]
Message-ID: <1515494623-8383-1-git-send-email-prime.zeng@hisilicon.com> (raw)

This issue is introduced by the commit <e7f63771b60e> ("ION: Sys_heap:
Add cached pool to spead up cached buffer alloc"), the gfp_mask low
order pool is overlapped by the high order inside the loop, so the
gfp_mask of all pools are set to high_order_gfp_flags.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 drivers/staging/android/ion/ion_system_heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index 4dc5d7a..b6386be 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools,
 					bool cached)
 {
 	int i;
-	gfp_t gfp_flags = low_order_gfp_flags;
 
 	for (i = 0; i < NUM_ORDERS; i++) {
 		struct ion_page_pool *pool;
+		gfp_t gfp_flags = low_order_gfp_flags;
 
 		if (orders[i] > 4)
 			gfp_flags = high_order_gfp_flags;
-- 
2.7.4

             reply	other threads:[~2018-01-09  2:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 10:43 Zeng Tao [this message]
2018-01-09  3:30 ` [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting Chen Feng
2018-01-09  9:14   ` Dan Carpenter
2018-01-09 12:06     ` 答复: " Zengtao (B)
2018-01-11  0:00       ` Laura Abbott
2018-01-11  2:06         ` 答复: " Zengtao (B)
2018-01-11 18:29           ` Laura Abbott

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=1515494623-8383-1-git-send-email-prime.zeng@hisilicon.com \
    --to=prime.zeng@hisilicon.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=puck.chen@hisilicon.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tkjos@android.com \
    /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).