Skip to content

Commit 3b0ae7b

Browse files
Derek Yergergregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Laura Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 80f10bc commit 3b0ae7b

File tree

1 file changed

+2
-2
lines changed
  • drivers/staging/android/ion

1 file changed

+2
-2
lines changed

drivers/staging/android/ion/ion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ static int debug_shrink_set(void *data, u64 val)
15551555
struct shrink_control sc;
15561556
int objs;
15571557

1558-
sc.gfp_mask = -1;
1558+
sc.gfp_mask = GFP_HIGHUSER;
15591559
sc.nr_to_scan = val;
15601560

15611561
if (!val) {
@@ -1573,7 +1573,7 @@ static int debug_shrink_get(void *data, u64 *val)
15731573
struct shrink_control sc;
15741574
int objs;
15751575

1576-
sc.gfp_mask = -1;
1576+
sc.gfp_mask = GFP_HIGHUSER;
15771577
sc.nr_to_scan = 0;
15781578

15791579
objs = heap->shrinker.count_objects(&heap->shrinker, &sc);

0 commit comments

Comments
 (0)