Buildresult: linus/generic-64bit_defconfig/parisc64-gcc11 built on Mar 15 2023, 16:01
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Mar 15 2023, 16:01
Duration:
0:01:45.337285
Builder:
alpine2
Revision:
sched_getaffinity: don't assume 'cpumask_size()' is fully initialized (
6015b1aca1a233379625385feb01dd014aca60b5)
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 6015b1aca1a233379625385feb01dd014aca60b5^{commit} 6015b1aca1a233379625385feb01dd014aca60b5 already have revision, skipping fetch # git checkout -q -f -B kisskb 6015b1aca1a233379625385feb01dd014aca60b5 # git clean -qxdf # < git log -1 # commit 6015b1aca1a233379625385feb01dd014aca60b5 # Author: Linus Torvalds <torvalds@linux-foundation.org> # Date: Tue Mar 14 19:32:38 2023 -0700 # # sched_getaffinity: don't assume 'cpumask_size()' is fully initialized # # The getaffinity() system call uses 'cpumask_size()' to decide how big # the CPU mask is - so far so good. It is indeed the allocation size of a # cpumask. # # But the code also assumes that the whole allocation is initialized # without actually doing so itself. That's wrong, because we might have # fixed-size allocations (making copying and clearing more efficient), but # not all of it is then necessarily used if 'nr_cpu_ids' is smaller. # # Having checked other users of 'cpumask_size()', they all seem to be ok, # either using it purely for the allocation size, or explicitly zeroing # the cpumask before using the size in bytes to copy it. # # See for example the ublk_ctrl_get_queue_affinity() function that uses # the proper 'zalloc_cpumask_var()' to make sure that the whole mask is # cleared, whether the storage is on the stack or if it was an external # allocation. # # Fix this by just zeroing the allocation before using it. Do the same # for the compat version of sched_getaffinity(), which had the same logic. # # Also, for consistency, make sched_getaffinity() use 'cpumask_bits()' to # access the bits. For a cpumask_var_t, it ends up being a pointer to the # same data either way, but it's just a good idea to treat it like you # would a 'cpumask_t'. The compat case already did that. # # Reported-by: Ryan Roberts <ryan.roberts@arm.com> # Link: https://lore.kernel.org/lkml/7d026744-6bd6-6827-0471-b5e8eae0be3f@arm.com/ # Cc: Yury Norov <yury.norov@gmail.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 6015b1aca1a233379625385feb01dd014aca60b5 # < make -s -j 160 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 160 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 160 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 160 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:45.337285
© Michael Ellerman 2006-2018.