summaryrefslogtreecommitdiffstats
path: root/lib/net_utils.c
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>2016-07-05 13:38:32 -0300
committerJens Axboe <axboe@fb.com>2016-07-13 09:31:44 -0700
commit9c8747167e204b3fe0ff143e1642c921e382e1d6 (patch)
tree14afaafefd01d4ef205697bb4b2b879a7ac4010a /lib/net_utils.c
parent141fd28cee8b0a4636e8f9c9e10d7d22bed3b108 (diff)
downloadlinux-stable-9c8747167e204b3fe0ff143e1642c921e382e1d6.tar.gz
linux-stable-9c8747167e204b3fe0ff143e1642c921e382e1d6.tar.bz2
linux-stable-9c8747167e204b3fe0ff143e1642c921e382e1d6.zip
block: atari: Return early for unsupported sector size
For 4K LBA or very large disks, atari_partition can easily get tricked into thinking it has found an Atari partition table. Depending on the data in the disk, it ends up creating partitions with awkward lengths. We saw logs like this while playing with fio. [5.625867] nvme2n1: AHDI p2 [5.625872] nvme2n1: p2 size 2910030523 extends beyond EOD, truncated People has had issues with misinterpreted AHDI partition tables for a long time, see this BSD thread from 1995, for example. https://mail-index.netbsd.org/port-atari/1995/11/19/0001.html Since the atari partition, according to the spec, doesn't even support sector sizes with more than 512, a quick sanity check is reasonable to just bail out early, before even attempting to read sector 0. Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions