Commit 3b0ae7be authored by Derek Yerger's avatar Derek Yerger Committed by Greg Kroah-Hartman
Browse files

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: default avatarDerek Yerger <dy@drexel.edu>
Reviewed-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 80f10bcc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);