Buildresult: linus/generic-64bit_defconfig/parisc64-gcc11 built on Mar 7 2023, 09:40
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Mar 7 2023, 09:40
Duration:
0:01:28.176170
Builder:
ka4
Revision:
cpumask: fix incorrect cpumask scanning result checks (
8ca09d5fa3549d142c2080a72a4c70ce389163cd)
Target:
linus/generic-64bit_defconfig/parisc64-gcc11
Branch:
linus
Compiler:
parisc64-gcc11
(hppa64-linux-gcc (GCC) 11.3.0 / GNU ld (GNU Binutils) 2.38)
Config:
generic-64bit_defconfig
(
download
)
Log:
Download original
Possible warnings (2)
include/linux/list.h:74:19: warning: 'seed_devices' may be used uninitialized in this function [-Wmaybe-uninitialized] fs/btrfs/send.c:1909:27: warning: 'right_gen' may be used uninitialized in this function [-Wmaybe-uninitialized]
Full Log
# git rev-parse -q --verify 8ca09d5fa3549d142c2080a72a4c70ce389163cd^{commit} 8ca09d5fa3549d142c2080a72a4c70ce389163cd already have revision, skipping fetch # git checkout -q -f -B kisskb 8ca09d5fa3549d142c2080a72a4c70ce389163cd # git clean -qxdf # < git log -1 # commit 8ca09d5fa3549d142c2080a72a4c70ce389163cd # Author: Linus Torvalds <torvalds@linux-foundation.org> # Date: Mon Mar 6 12:15:13 2023 -0800 # # cpumask: fix incorrect cpumask scanning result checks # # It turns out that commit 596ff4a09b89 ("cpumask: re-introduce # constant-sized cpumask optimizations") exposed a number of cases of # drivers not checking the result of "cpumask_next()" and friends # correctly. # # The documented correct check for "no more cpus in the cpumask" is to # check for the result being equal or larger than the number of possible # CPU ids, exactly _because_ we've always done those constant-sized # cpumask scans using a widened type before. So the return value of a # cpumask scan should be checked with # # if (cpu >= nr_cpu_ids) # ... # # because the cpumask scan did not necessarily stop exactly *at* that # maximum CPU id. # # But a few cases ended up instead using checks like # # if (cpu == nr_cpumask_bits) # ... # # which used that internal "widened" number of bits. And that used to # work pretty much by accident (ok, in this case "by accident" is simply # because it matched the historical internal implementation of the cpumask # scanning, so it was more of a "intentionally using implementation # details rather than an accident"). # # But the extended constant-sized optimizations then did that internal # implementation differently, and now that code that did things wrong but # matched the old implementation no longer worked at all. # # Which then causes subsequent odd problems due to using what ends up # being an invalid CPU ID. # # Most of these cases require either unusual hardware or special uses to # hit, but the random.c one triggers quite easily. # # All you really need is to have a sufficiently small CONFIG_NR_CPUS value # for the bit scanning optimization to be triggered, but not enough CPUs # to then actually fill that widened cpumask. At that point, the cpumask # scanning will return the NR_CPUS constant, which is _not_ the same as # nr_cpumask_bits. # # This just does the mindless fix with # # sed -i 's/== nr_cpumask_bits/>= nr_cpu_ids/' # # to fix the incorrect uses. # # The ones in the SCSI lpfc driver in particular could probably be fixed # more cleanly by just removing that repeated pattern entirely, but I am # not emptionally invested enough in that driver to care. # # Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net> # Link: https://lore.kernel.org/lkml/481b19b5-83a0-4793-b4fd-194ad7b978c3@roeck-us.net/ # Reported-and-tested-by: Geert Uytterhoeven <geert+renesas@glider.be> # Link: https://lore.kernel.org/lkml/CAMuHMdUKo_Sf7TjKzcNDa8Ve+6QrK+P8nSQrSQ=6LTRmcBKNww@mail.gmail.com/ # Reported-by: Vernon Yang <vernon2gm@gmail.com> # Link: https://lore.kernel.org/lkml/20230306160651.2016767-1-vernon2gm@gmail.com/ # Cc: Yury Norov <yury.norov@gmail.com> # Cc: Jason A. Donenfeld <Jason@zx2c4.com> # Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> # < /opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux-ld --version # < git log --format=%s --max-count=1 8ca09d5fa3549d142c2080a72a4c70ce389163cd # < make -s -j 40 ARCH=parisc64 O=/kisskb/build/linus_generic-64bit_defconfig_parisc64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux- generic-64bit_defconfig # < make -s -j 40 ARCH=parisc64 O=/kisskb/build/linus_generic-64bit_defconfig_parisc64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux- help # make -s -j 40 ARCH=parisc64 O=/kisskb/build/linus_generic-64bit_defconfig_parisc64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux- olddefconfig # make -s -j 40 ARCH=parisc64 O=/kisskb/build/linus_generic-64bit_defconfig_parisc64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/hppa-linux/bin/hppa64-linux- In file included from /kisskb/src/include/linux/rculist.h:10, from /kisskb/src/include/linux/pid.h:5, from /kisskb/src/include/linux/sched.h:14, from /kisskb/src/fs/btrfs/volumes.c:6: /kisskb/src/fs/btrfs/volumes.c: In function 'btrfs_init_new_device': /kisskb/src/include/linux/list.h:74:19: warning: 'seed_devices' may be used uninitialized in this function [-Wmaybe-uninitialized] 74 | new->prev = prev; | ~~~~~~~~~~^~~~~~ /kisskb/src/fs/btrfs/volumes.c:2612:34: note: 'seed_devices' was declared here 2612 | struct btrfs_fs_devices *seed_devices; | ^~~~~~~~~~~~ /kisskb/src/fs/btrfs/send.c: In function 'get_cur_inode_state': /kisskb/src/fs/btrfs/send.c:1909:27: warning: 'right_gen' may be used uninitialized in this function [-Wmaybe-uninitialized] 1909 | } else if (right_gen == gen) { | ^ Completed OK # rm -rf /kisskb/build/linus_generic-64bit_defconfig_parisc64-gcc11 # Build took: 0:01:28.176170
© Michael Ellerman 2006-2018.