Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1731729

Re: [PATCH] brd: fix overflow in __brd_direct_access

From Jens Axboe <axboe@kernel.dk>
Newsgroups linux.kernel
Subject Re: [PATCH] brd: fix overflow in __brd_direct_access
Date 2017-09-13 19:20 +0200
Message-ID <upjup-1Ow-3@gated-at.bofh.it> (permalink)
References <upfKa-7Rm-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] brd: fix overflow in __brd_direct_access Mikulas Patocka <mpatocka@redhat.com> - 2017-09-13 15:20 +0200
  Re: [PATCH] brd: fix overflow in __brd_direct_access Dan Williams <dan.j.williams@intel.com> - 2017-09-13 18:30 +0200
  Re: [PATCH] brd: fix overflow in __brd_direct_access Jens Axboe <axboe@kernel.dk> - 2017-09-13 19:20 +0200

csiph-web