# git rev-parse -q --verify b5baf00a90701b96e99ca3ca04d9f746bfe8ed89^{commit} b5baf00a90701b96e99ca3ca04d9f746bfe8ed89 already have revision, skipping fetch # git checkout -q -f -B kisskb b5baf00a90701b96e99ca3ca04d9f746bfe8ed89 # git clean -qxdf # < git log -1 # commit b5baf00a90701b96e99ca3ca04d9f746bfe8ed89 # Author: Maciej S. Szmigiero # Date: Sun Nov 10 14:55:42 2019 +0100 # # random: Don't freeze in add_hwgenerator_randomness() if stopping kthread # # Since commit 59b569480dc8 # ("random: Use wait_event_freezable() in add_hwgenerator_randomness()") # there is a race in add_hwgenerator_randomness() between freezing and # stopping the calling kthread. # # This commit changed wait_event_interruptible() call with # kthread_freezable_should_stop() as a condition into wait_event_freezable() # with just kthread_should_stop() as a condition to fix a warning that # kthread_freezable_should_stop() might sleep inside the wait. # # wait_event_freezable() ultimately calls __refrigerator() with its # check_kthr_stop argument set to false, which causes it to keep the kthread # frozen even if somebody calls kthread_stop() on it. # # Calling wait_event_freezable() with kthread_should_stop() as a condition # is racy because it doesn't take into account the situation where this # condition becomes true on a kthread marked for freezing only after this # condition has already been checked. # # Calling freezing() should avoid the issue that the commit 59b569480dc8 has # fixed, as it is only a checking function, it doesn't actually do the # freezing. # # add_hwgenerator_randomness() has two post-boot users: in khwrng the # kthread will be frozen anyway by call to kthread_freezable_should_stop() # in its main loop, while its second user (ath9k-hwrng) is not freezable at # all. # # This change allows a VM with virtio-rng loaded to write s2disk image # successfully. # # Fixes: 59b569480dc8 ("random: Use wait_event_freezable() in add_hwgenerator_randomness()") # Signed-off-by: Maciej S. Szmigiero # Signed-off-by: Herbert Xu # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 b5baf00a90701b96e99ca3ca04d9f746bfe8ed89 # < make -s -j 32 ARCH=powerpc O=/kisskb/build/crypto_powernv_defconfig_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- powernv_defconfig # make -s -j 32 ARCH=powerpc O=/kisskb/build/crypto_powernv_defconfig_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /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:1651:6: note: 'oldval' was declared here int oldval, ret; ^ WARNING: vmlinux.o(.text+0x2fd0): Section mismatch in reference from the variable start_here_common to the function .init.text:start_kernel() The function start_here_common() references the function __init start_kernel(). This is often because start_here_common lacks a __init annotation or the annotation of start_kernel is wrong. Completed OK # rm -rf /kisskb/build/crypto_powernv_defconfig_ppc64le-gcc5 # Build took: 0:03:16.632025