From: Greg Kroah-Hartman Date: Tue, 4 Jun 2019 13:44:28 +0000 (+0200) Subject: fix build error in staging patch for 4.9.y and 4.14.y X-Git-Tag: v5.1.8~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eec70be9d3db90448bc93cc6066645ab5a60beae;p=thirdparty%2Fkernel%2Fstable-queue.git fix build error in staging patch for 4.9.y and 4.14.y --- diff --git a/queue-4.14/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch b/queue-4.14/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch index d8a97b53821..3e8d6efe487 100644 --- a/queue-4.14/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch +++ b/queue-4.14/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch @@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman offset = ((unsigned int)(unsigned long)buf & (PAGE_SIZE - 1)); num_pages = DIV_ROUND_UP(count + offset, PAGE_SIZE); -+ if (num_pages > (SIZE_MAX - sizeof(struct pagelist) - ++ if (num_pages > (SIZE_MAX - sizeof(PAGELIST_T) - + sizeof(struct vchiq_pagelist_info)) / + (sizeof(u32) + sizeof(pages[0]) + + sizeof(struct scatterlist))) diff --git a/queue-4.9/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch b/queue-4.9/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch index 8ea786cdbb5..e8436bab9c7 100644 --- a/queue-4.9/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch +++ b/queue-4.9/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch @@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman offset = (unsigned int)buf & (PAGE_SIZE - 1); num_pages = (count + offset + PAGE_SIZE - 1) / PAGE_SIZE; -+ if (num_pages > (SIZE_MAX - sizeof(struct pagelist) - ++ if (num_pages > (SIZE_MAX - sizeof(PAGELIST_T) - + sizeof(struct vchiq_pagelist_info)) / + (sizeof(u32) + sizeof(pages[0]) + + sizeof(struct scatterlist)))