[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fb12beef-6c0e-5c13-ab95-29683243f095@kernel.dk>
Date: Wed, 13 Sep 2017 11:18:18 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Mikulas Patocka <mpatocka@...hat.com>,
Dan Williams <dan.j.williams@...el.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] brd: fix overflow in __brd_direct_access
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
Powered by blists - more mailing lists