]> git.baikalelectronics.ru Git - kernel.git/commit
brd: Switch rd_size to unsigned long
authorJan Kara <jack@suse.cz>
Tue, 25 Oct 2016 11:53:27 +0000 (13:53 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 25 Oct 2016 17:55:23 +0000 (11:55 -0600)
commitd84c07dad501e615358c62a6767ba82dbdc124eb
tree0c8e3977ec113b0caeabdb42d290c2f06480504f
parentfe52e04f7146da96351b471284a0946d0ee3231c
brd: Switch rd_size to unsigned long

Currently rd_size was int which lead to overflow and bogus device size
once the requested ramdisk size was 1 TB or more. Although these days
ramdisks with 1 TB size are mostly a mistake, the days when they are
useful are not far.

Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/brd.c