[COMMON] ion: send aligned size to secure OS
authorhyesoo.yu <hyesoo.yu@samsung.com>
Fri, 1 Jun 2018 02:29:15 +0000 (11:29 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:27 +0000 (14:39 +0900)
Change-Id: I172f426a3289b3d8f26853e43fcd219d12e994c6
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/staging/android/ion/ion_buffer_protect.c

index 375da55c9694f71d43c4871c264ab4672dff5e50..22c0d46ab301af483e2b337dede23051619ca7ef 100644 (file)
@@ -198,7 +198,7 @@ void *ion_buffer_protect_single(unsigned int protection_id, unsigned int size,
 
        protdesc->chunk_count = 1,
        protdesc->flags = protection_id;
-       protdesc->chunk_size = size;
+       protdesc->chunk_size = ALIGN(size, protalign);
        protdesc->bus_address = phys;
 
        ret = ion_secure_protect(protdesc, protalign);