Linux Kernels

staging: ion: debugfs invalid gfp mask

This change “staging: ion: debugfs invalid gfp mask” (commit 3b0ae7b) in Linux kernel is authored by Derek Yerger <dy [at] drexel.edu> on Fri Mar 11 17:31:18 2016 -0500.

Description of "staging: ion: debugfs invalid gfp mask"

The change “staging: ion: debugfs invalid gfp mask” introduces changes as follows.

staging: ion: debugfs invalid gfp mask

The current code attempts assignment of -1 to an unsigned type. Note that
in a downstream function ion_page_pool_shrink this mask is only ever
evaluated against __GFP_HIGHMEM
(drivers/staging/android/ion/ion_page_pool.c, line 125).

Signed-off-by: Derek Yerger <dy@drexel.edu>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit 3b0ae7b

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: ion: debugfs invalid gfp mask"

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 33b390e7ea31..1c872bdfddf6 100755
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1555,7 +1555,7 @@ static int debug_shrink_set(void *data, u64 val)
 	struct shrink_control sc;
 	int objs;
 
-	sc.gfp_mask = -1;
+	sc.gfp_mask = GFP_HIGHUSER;
 	sc.nr_to_scan = val;
 
 	if (!val) {
@@ -1573,7 +1573,7 @@ static int debug_shrink_get(void *data, u64 *val)
 	struct shrink_control sc;
 	int objs;
 
-	sc.gfp_mask = -1;
+	sc.gfp_mask = GFP_HIGHUSER;
 	sc.nr_to_scan = 0;
 
 	objs = heap->shrinker.count_objects(&heap->shrinker, &sc);

The commit for this change in Linux stable tree is 3b0ae7b (patch).

Last modified: 2020/01/11 09:39