OpenCloudOS-Kernel/arch/arm
Thomas Gleixner 8101b5a153 ARM: futex: Address build warning
Stephen reported the following build warning on a ARM multi_v7_defconfig
build with GCC 9.2.1:

kernel/futex.c: In function 'do_futex':
kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1676 |   return oldval == cmparg;
      |          ~~~~~~~^~~~~~~~~
kernel/futex.c:1652:6: note: 'oldval' was declared here
 1652 |  int oldval, ret;
      |      ^~~~~~

introduced by commit a08971e948 ("futex: arch_futex_atomic_op_inuser()
calling conventions change").

While that change should not make any difference it confuses GCC which
fails to work out that oldval is not referenced when the return value is
not zero.

GCC fails to properly analyze arch_futex_atomic_op_inuser(). It's not the
early return, the issue is with the assembly macros. GCC fails to detect
that those either set 'ret' to 0 and set oldval or set 'ret' to -EFAULT
which makes oldval uninteresting. The store to the callsite supplied oldval
pointer is conditional on ret == 0.

The straight forward way to solve this is to make the store unconditional.

Aside of addressing the build warning this makes sense anyway because it
removes the conditional from the fastpath. In the error case the stored
value is uninteresting and the extra store does not matter at all.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/87pncao2ph.fsf@nanos.tec.linutronix.de
2020-05-07 00:41:47 +02:00
..
boot ARM: SoC fixes 2020-04-23 09:36:40 -07:00
common ARM: sa1111: Fix irq_retrigger callback return value 2020-03-16 15:48:54 +00:00
configs ARM: defconfig updates 2020-04-03 15:15:10 -07:00
crypto crypto: arch/nhpoly1305 - process in explicit 4k chunks 2020-04-30 15:16:59 +10:00
include ARM: futex: Address build warning 2020-05-07 00:41:47 +02:00
kernel SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
lib ARM: 8958/1: rename missed uaccess .fixup section 2020-02-21 17:03:21 +00:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: SoC updates 2020-04-03 15:02:35 -07:00
mach-axxia
mach-bcm ARM: bcm: Drop unneeded select of PCI_DOMAINS_GENERIC, HAVE_SMP, TIMER_OF 2020-03-10 10:58:26 -07:00
mach-berlin
mach-clps711x
mach-cns3xxx ARM: cns3xxx: replace setup_irq() by request_irq() 2020-03-27 14:11:47 +01:00
mach-davinci ARM: SoC: late updates 2020-02-08 14:17:27 -08:00
mach-digicolor
mach-dove arm: mach-dove: Mark dove_io_desc as __maybe_unused 2020-03-13 21:44:50 +01:00
mach-ebsa110 ARM: 8964/1: ebsa110: replace setup_irq() by request_irq() 2020-03-19 09:27:39 +00:00
mach-efm32
mach-ep93xx ARM: ep93xx: Replace setup_irq() by request_irq() 2020-03-27 14:11:42 +01:00
mach-exynos arm: Unplug KVM from the build system 2020-03-24 10:55:50 +00:00
mach-footbridge ARM: 8965/2: footbridge: replace setup_irq() by request_irq() 2020-03-19 09:27:40 +00:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y 2020-04-17 16:29:59 +02:00
mach-integrator ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro 2020-03-26 22:05:12 +01:00
mach-iop32x ARM: iop32x: replace setup_irq() by request_irq() 2020-03-27 14:10:52 +01:00
mach-ixp4xx
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson ARM: meson: Drop unneeded select of COMMON_CLK 2020-02-29 08:16:20 -08:00
mach-milbeaut
mach-mmp ARM: mmp: replace setup_irq() by request_irq() 2020-03-27 14:11:50 +01:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm ARM: npcm: Bring back GPIOLIB support 2020-02-09 03:44:51 -08:00
mach-nspire
mach-omap1 ARM: SoC updates 2020-04-03 15:02:35 -07:00
mach-omap2 change email address for Pali Rohár 2020-04-10 15:36:22 -07:00
mach-orion5x ARM: orion5x: ts78xx: Remove unneeded variable ret 2020-03-08 12:42:07 +01:00
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa backlight: corgi: Convert to use GPIO descriptors 2020-03-25 09:30:46 +00:00
mach-qcom ARM: qcom: Add support for IPQ40xx 2020-03-31 21:03:27 +02:00
mach-rda
mach-realview
mach-rockchip
mach-rpc ARM: 8966/1: rpc: replace setup_irq() by request_irq() 2020-03-19 09:27:42 +00:00
mach-s3c24xx backlight: pwm_bl: Switch to full GPIO descriptor 2020-03-18 15:05:57 +00:00
mach-s3c64xx backlight: pwm_bl: Switch to full GPIO descriptor 2020-03-18 15:05:57 +00:00
mach-s5pv210
mach-sa1100
mach-shmobile ARM: shmobile: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-17 11:39:44 +01:00
mach-socfpga
mach-spear ARM: spear: replace setup_irq() by request_irq() 2020-03-27 14:11:45 +01:00
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-12 18:15:39 +01:00
mach-tango
mach-tegra cpuidle: tegra: Squash Tegra114 driver into the common driver 2020-03-13 11:32:01 +01:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zx
mach-zynq ARM: zynq: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-13 07:26:36 +01:00
mm mm/special: create generic fallbacks for pte_special() and pte_mkspecial() 2020-04-10 15:36:21 -07:00
net arm, bpf: Fix offset overflow for BPF_MEM BPF_DW 2020-04-14 21:27:54 +02:00
nwfpe
oprofile
plat-omap
plat-orion ARM: orion: replace setup_irq() by request_irq() 2020-03-13 21:37:15 +01:00
plat-pxa
plat-samsung
plat-versatile
probes
tools threads-v5.6 2020-01-29 19:38:34 -08:00
vdso .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
vfp
xen arm/xen: make _xen_start_info static 2020-04-17 07:45:12 +02:00
Kconfig ARM: 2020-04-02 15:13:15 -07:00
Kconfig-nommu
Kconfig.debug ARM: debug: stm32: add UART early console support for STM32MP1 2020-03-13 17:05:07 +01:00
Makefile ARM: SoC updates 2020-04-03 15:02:35 -07:00