xpmem: handle size 0xffffffffffffffff

Change-Id: I04fbe21966f8a831337576a14119afefe8a2ea4f
This commit is contained in:
Balazs Gerofi
2020-03-06 18:35:31 +09:00
parent baf68f7e71
commit 92d191de9e

View File

@ -451,7 +451,9 @@ static int xpmem_make(
* The start of the segment must be page aligned and it must be a
* multiple of pages in size.
*/
if (offset_in_page(vaddr) != 0 || offset_in_page(size) != 0) {
if (offset_in_page(vaddr) != 0 ||
/* Special treatment of -1UL */
(offset_in_page(size) != 0 && size != 0xffffffffffffffff)) {
xpmem_tg_deref(seg_tg);
XPMEM_DEBUG("return: ret=%d", -EINVAL);
return -EINVAL;