android_kernel_xiaomi_sm8350/block/partitions
Michael Schmitz 373b9475ea block/partition: fix signedness issue for Amiga partitions
commit 7eb1e47696aa231b1a567846bbe3a1e1befe1854 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:37:29 +02:00
..
acorn.c block: switch all files cleared marked as GPLv2 to SPDX tags 2019-04-30 16:11:57 -06:00
acorn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aix.c
aix.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
amiga.c block/partition: fix signedness issue for Amiga partitions 2023-07-27 08:37:29 +02:00
amiga.h
atari.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atari.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
check.c
check.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmdline.c
cmdline.h
efi.c
efi.h block: switch all files cleared marked as GPLv2 or later to SPDX tags 2019-04-30 16:11:59 -06:00
ibm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ibm.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
karma.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
karma.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
Kconfig
ldm.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
ldm.h block: switch all files cleared marked as GPLv2 or later to SPDX tags 2019-04-30 16:11:59 -06:00
mac.c
mac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msdos.c partitions/msdos: Unable to mount UFS 44bsd partitions 2018-01-10 09:12:16 -07:00
msdos.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
osf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
osf.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
sgi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sgi.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
sun.c
sun.h
sysv68.c
sysv68.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
ultrix.c
ultrix.h block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00