Centos-kernel-stream-9/block/partitions
Ming Lei 6bd75d2987 block/partition: fix signedness issue for Amiga partitions
JIRA: https://issues.redhat.com/browse/RHEL-1516

commit 7eb1e47696aa231b1a567846bbe3a1e1befe1854
Author: Michael Schmitz <schmitzmic@gmail.com>
Date:   Wed Jul 5 11:38:08 2023 +1200

    block/partition: fix signedness issue for Amiga partitions

    Making 'blk' sector_t (i.e. 64 bit if LBD support is active) fails the
    'blk>0' test in the partition block loop if a value of (signed int) -1 is
    used to mark the end of the partition block list.

    Explicitly cast 'blk' to signed int to allow use of -1 to terminate the
    partition block linked list.

    Fixes: b6f3f28f604b ("block: add overflow checks for Amiga partition support")
    Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
    Link: https://lore.kernel.org/r/024ce4fa-cc6d-50a2-9aae-3701d0ebf668@xenosoft.de
    Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
    Reviewed-by: Martin Steigerwald <martin@lichtvoll.de>
    Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Ming Lei <ming.lei@redhat.com>
2023-09-18 17:59:20 +08:00
..
Kconfig block: move menu "Partition type" to block/partitions/Kconfig 2021-12-06 16:42:52 +08:00
Makefile
acorn.c block/partitions/acorn: Remove redundant assignments 2022-06-22 08:58:02 +08:00
aix.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
amiga.c block/partition: fix signedness issue for Amiga partitions 2023-09-18 17:59:20 +08:00
atari.c block/partitions/atari: Remove redundant assignment 2022-06-22 08:58:02 +08:00
atari.h
check.h block: remove genhd.h 2022-06-22 08:53:32 +08:00
cmdline.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
core.c block: add capacity validation in bdev_add_partition() 2023-09-18 17:59:19 +08:00
efi.c partitions/efi: use bdev_nr_bytes instead of open coding it 2021-12-06 16:45:27 +08:00
efi.h block: remove genhd.h 2022-06-22 08:53:32 +08:00
ibm.c partitions/ibm: use bdev_nr_sectors instead of open coding it 2021-12-06 16:45:28 +08:00
karma.c
ldm.c block/partitions/ldm: Remove redundant assignments 2022-06-22 08:58:03 +08:00
ldm.h block: remove genhd.h 2022-06-22 08:53:32 +08:00
mac.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
mac.h
msdos.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
osf.c
sgi.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
sun.c block: store a gendisk in struct parsed_partitions 2021-12-06 16:37:50 +08:00
sysv68.c
ultrix.c