# git rev-parse -q --verify 66be4e66a7f422128748e3c3ef6ee72b20a6197b^{commit} 66be4e66a7f422128748e3c3ef6ee72b20a6197b already have revision, skipping fetch # git checkout -q -f -B kisskb 66be4e66a7f422128748e3c3ef6ee72b20a6197b # git clean -qxdf # < git log -1 # commit 66be4e66a7f422128748e3c3ef6ee72b20a6197b # Author: Linus Torvalds # Date: Mon Jun 3 13:26:20 2019 -0700 # # rcu: locking and unlocking need to always be at least barriers # # Herbert Xu pointed out that commit bb73c52bad36 ("rcu: Don't disable # preemption for Tiny and Tree RCU readers") was incorrect in making the # preempt_disable/enable() be conditional on CONFIG_PREEMPT_COUNT. # # If CONFIG_PREEMPT_COUNT isn't enabled, the preemption enable/disable is # a no-op, but still is a compiler barrier. # # And RCU locking still _needs_ that compiler barrier. # # It is simply fundamentally not true that RCU locking would be a complete # no-op: we still need to guarantee (for example) that things that can # trap and cause preemption cannot migrate into the RCU locked region. # # The way we do that is by making it a barrier. # # See for example commit 386afc91144b ("spinlocks and preemption points # need to be at least compiler barriers") from back in 2013 that had # similar issues with spinlocks that become no-ops on UP: they must still # constrain the compiler from moving other operations into the critical # region. # # Now, it is true that a lot of RCU operations already use READ_ONCE() and # WRITE_ONCE() (which in practice likely would never be re-ordered wrt # anything remotely interesting), but it is also true that that is not # globally the case, and that it's not even necessarily always possible # (ie bitfields etc). # # Reported-by: Herbert Xu # Fixes: bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") # Cc: stable@kernel.org # Cc: Boqun Feng # Cc: Paul E. McKenney # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux-ld --version # < git log --format=%s --max-count=1 66be4e66a7f422128748e3c3ef6ee72b20a6197b # < make -s -j 80 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- allyesconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # yes \n | make -s -j 80 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- oldconfig yes: standard output: Broken pipe # make -s -j 80 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- /kisskb/src/drivers/hwtracing/intel_th/msu.c: In function 'msc_buffer_win_alloc': /kisskb/src/drivers/hwtracing/intel_th/msu.c:783:21: warning: unused variable 'i' [-Wunused-variable] int ret = -ENOMEM, i; ^ /kisskb/src/drivers/hwtracing/intel_th/msu.c: In function 'msc_buffer_win_free': /kisskb/src/drivers/hwtracing/intel_th/msu.c:863:6: warning: unused variable 'i' [-Wunused-variable] int i; ^ /kisskb/src/drivers/input/joystick/analog.c:160:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] #warning Precise timer not defined for this architecture. ^~~~~~~ /kisskb/src/lib/test_kasan.c: In function 'kasan_alloca_oob_left': /kisskb/src/lib/test_kasan.c:491:1: warning: 'kasan_alloca_oob_left' uses dynamic stack allocation } ^ /kisskb/src/lib/test_kasan.c: In function 'kasan_alloca_oob_right': /kisskb/src/lib/test_kasan.c:501:1: warning: 'kasan_alloca_oob_right' uses dynamic stack allocation } ^ In file included from /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:40: /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c: In function 'mvpp2_setup_bm_pool': /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2.h:614:2: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551584' to '-32' [-Woverflow] ((total_size) - NET_SKB_PAD - MVPP2_SKB_SHINFO_SIZE) ^ /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2.h:677:33: note: in expansion of macro 'MVPP2_RX_MAX_PKT_SIZE' #define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE) ^~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:551:41: note: in expansion of macro 'MVPP2_BM_SHORT_PKT_SIZE' mvpp2_pools[MVPP2_BM_SHORT].pkt_size = MVPP2_BM_SHORT_PKT_SIZE; ^~~~~~~~~~~~~~~~~~~~~~~ Completed OK # rm -rf /kisskb/build/linus_s390-allyesconfig_s390x-gcc8 # Build took: 0:17:57.910576