# git rev-parse -q --verify ab6f762f0f53162d41497708b33c9a3236d3609e^{commit} ab6f762f0f53162d41497708b33c9a3236d3609e already have revision, skipping fetch # git checkout -q -f -B kisskb ab6f762f0f53162d41497708b33c9a3236d3609e # git clean -qxdf # < git log -1 # commit ab6f762f0f53162d41497708b33c9a3236d3609e # Author: Sergey Senozhatsky # Date: Tue Mar 3 20:30:02 2020 +0900 # # printk: queue wake_up_klogd irq_work only if per-CPU areas are ready # # printk_deferred(), similarly to printk_safe/printk_nmi, does not # immediately attempt to print a new message on the consoles, avoiding # calls into non-reentrant kernel paths, e.g. scheduler or timekeeping, # which potentially can deadlock the system. # # Those printk() flavors, instead, rely on per-CPU flush irq_work to print # messages from safer contexts. For same reasons (recursive scheduler or # timekeeping calls) printk() uses per-CPU irq_work in order to wake up # user space syslog/kmsg readers. # # However, only printk_safe/printk_nmi do make sure that per-CPU areas # have been initialised and that it's safe to modify per-CPU irq_work. # This means that, for instance, should printk_deferred() be invoked "too # early", that is before per-CPU areas are initialised, printk_deferred() # will perform illegal per-CPU access. # # Lech Perczak [0] reports that after commit 1b710b1b10ef ("char/random: # silence a lockdep splat with printk()") user-space syslog/kmsg readers # are not able to read new kernel messages. # # The reason is printk_deferred() being called too early (as was pointed # out by Petr and John). # # Fix printk_deferred() and do not queue per-CPU irq_work before per-CPU # areas are initialized. # # Link: https://lore.kernel.org/lkml/aa0732c6-5c4e-8a8b-a1c1-75ebe3dca05b@camlintechnologies.com/ # Reported-by: Lech Perczak # Signed-off-by: Sergey Senozhatsky # Tested-by: Jann Horn # Reviewed-by: Petr Mladek # Cc: Greg Kroah-Hartman # Cc: Theodore Ts'o # Cc: John Ogness # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 ab6f762f0f53162d41497708b33c9a3236d3609e # < make -s -j 80 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # < make -s -j 80 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- help # make -s -j 80 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- olddefconfig # make -s -j 80 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg; ^ /kisskb/src/kernel/futex.c:1652:6: note: 'oldval' was declared here int oldval, ret; ^ FIT description: Linux 5.6.0-gab6f762f0f53 Created: Sat Apr 11 09:06:54 2020 Image 0 (kernel@0) Description: Linux 5.6.0-gab6f762f0f53 Created: Sat Apr 11 09:06:54 2020 Type: Kernel Image Compression: gzip compressed Data Size: 4936080 Bytes = 4820.39 KiB = 4.71 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x809181f0 Hash algo: sha1 Hash value: 2d50a86a4b956b8d946ab3729e70d9a371928570 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Sat Apr 11 09:06:54 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Sat Apr 11 09:06:54 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Sat Apr 11 09:06:54 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 4639 Bytes = 4.53 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 018897896b42c41c943aca35a20e4300dba250c8 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Sat Apr 11 09:06:54 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 5198 Bytes = 5.08 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 36c7bd0bd79cfc2f7dd6acda6c7996294f4967e6 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Sat Apr 11 09:06:54 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/linus_mips-defconfig_mipsel # Build took: 0:01:49.283415