lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] brd: fix overflow in __brd_direct_access
From
Date
On 09/13/2017 07:17 AM, Mikulas Patocka wrote:
> The code in __brd_direct_access multiplies the pgoff variable by page size
> and divides it by 512. It can cause overflow on 32-bit architectures. The
> overflow happens if we create ramdisk larger than 4G and use it as a
> sparse device.
>
> This patch replaces multiplication and division with multiplication by the
> number of sectors per page.

Thanks, applied with Dan's ack.

--
Jens Axboe

\
 
 \ /
  Last update: 2017-09-13 19:19    [W:0.059 / U:0.904 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site