]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: ion: debugfs invalid gfp mask
authorDerek Yerger <dy@drexel.edu>
Fri, 11 Mar 2016 22:31:18 +0000 (17:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
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>
drivers/staging/android/ion/ion.c

index 33b390e7ea31174558dd95e5da961a61464999e3..1c872bdfddf600b322165389690b99646473e67d 100755 (executable)
@@ -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);