]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix build error in staging patch for 4.9.y and 4.14.y
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 13:44:28 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 13:44:28 +0000 (15:44 +0200)
queue-4.14/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch
queue-4.9/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch

index d8a97b5382139184c3002661d265185b3012c1ed..3e8d6efe4875555a4df3946b2f195e6a28bc7bc4 100644 (file)
@@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        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)))
index 8ea786cdbb593fe144174d3bf1ba59243ef746d7..e8436bab9c75d146faa1f6a68b7dbbdec8d22dfb 100644 (file)
@@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        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)))