The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 2c92dd20304f505b6ef43d206fff21bda8f1f0ae Mon Sep 17 00:00:00 2001
From: Faiz Abbas <faiz_abbas(a)ti.com>
Date: Fri, 6 Dec 2019 17:13:26 +0530
Subject: [PATCH] mmc: sdhci: Update the tuning failed messages to pr_debug
level
Tuning support in DDR50 speed mode was added in SD Specifications Part1
Physical Layer Specification v3.01. Its not possible to distinguish
between v3.00 and v3.01 from the SCR and that is why since
commit 4324f6de6d2e ("mmc: core: enable CMD19 tuning for DDR50 mode")
tuning failures are ignored in DDR50 speed mode.
Cards compatible with v3.00 don't respond to CMD19 in DDR50 and this
error gets printed during enumeration and also if retune is triggered at
any time during operation. Update the printk level to pr_debug so that
these errors don't lead to false error reports.
Signed-off-by: Faiz Abbas <faiz_abbas(a)ti.com>
Cc: stable(a)vger.kernel.org # v4.4+
Link: https://lore.kernel.org/r/20191206114326.15856-1-faiz_abbas@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson(a)linaro.org>
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 296d955ede59..42a9c8179da7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2417,8 +2417,8 @@ static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
sdhci_send_tuning(host, opcode);
if (!host->tuning_done) {
- pr_info("%s: Tuning timeout, falling back to fixed sampling clock\n",
- mmc_hostname(host->mmc));
+ pr_debug("%s: Tuning timeout, falling back to fixed sampling clock\n",
+ mmc_hostname(host->mmc));
sdhci_abort_tuning(host, opcode);
return -ETIMEDOUT;
}
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 396d2e878f92ec108e4293f1c77ea3bc90b414ff Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson(a)google.com>
Date: Fri, 13 Dec 2019 16:15:15 -0800
Subject: [PATCH] kvm: x86: Host feature SSBD doesn't imply guest feature
SPEC_CTRL_SSBD
The host reports support for the synthetic feature X86_FEATURE_SSBD
when any of the three following hardware features are set:
CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31]
CPUID.80000008H:EBX.AMD_SSBD[bit 24]
CPUID.80000008H:EBX.VIRT_SSBD[bit 25]
Either of the first two hardware features implies the existence of the
IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does
not. Therefore, CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] should only be
set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or
CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host.
Fixes: 0c54914d0c52a ("KVM: x86: use Intel speculation bugs and features as derived in generic x86 code")
Signed-off-by: Jim Mattson <jmattson(a)google.com>
Reviewed-by: Jacob Xu <jacobhxu(a)google.com>
Reviewed-by: Peter Shier <pshier(a)google.com>
Cc: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: stable(a)vger.kernel.org
Reported-by: Eric Biggers <ebiggers(a)kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c0aa07487eb8..dd18aa6fa317 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -402,7 +402,8 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
entry->edx |= F(SPEC_CTRL);
if (boot_cpu_has(X86_FEATURE_STIBP))
entry->edx |= F(INTEL_STIBP);
- if (boot_cpu_has(X86_FEATURE_SSBD))
+ if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
+ boot_cpu_has(X86_FEATURE_AMD_SSBD))
entry->edx |= F(SPEC_CTRL_SSBD);
/*
* We emulate ARCH_CAPABILITIES in software even
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 Mon Sep 17 00:00:00 2001
From: Yonghan Ye <yonghan.ye(a)unisoc.com>
Date: Wed, 4 Dec 2019 20:00:07 +0800
Subject: [PATCH] serial: sprd: Add clearing break interrupt operation
A break interrupt will be generated if the RX line was pulled low, which
means some abnomal behaviors occurred of the UART. In this case, we still
need to clear this break interrupt status, otherwise it will cause irq
storm to crash the whole system.
Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support")
Signed-off-by: Yonghan Ye <yonghan.ye(a)unisoc.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Baolin Wang <baolin.wang7(a)gmail.com>
Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.15754606…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 31df23502562..f60a59d9bf27 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
if (ims & SPRD_IMSR_TIMEOUT)
serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
+ if (ims & SPRD_IMSR_BREAK_DETECT)
+ serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT);
+
if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT |
SPRD_IMSR_TIMEOUT))
sprd_rx(port);
stable-rc/linux-4.14.y build: 201 builds: 177 failed, 24 passed, 177 errors, 455 warnings (v4.14.161-72-gac4e1f65c8e8)
Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.14.y/kernel/v4.14.161-7…
Tree: stable-rc
Branch: linux-4.14.y
Git Describe: v4.14.161-72-gac4e1f65c8e8
Git Commit: ac4e1f65c8e8dbb1e7677acef9b3508aa2f8c3b1
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Built: 6 unique architectures
Build Failures Detected:
arc:
axs103_defconfig: (gcc-8) FAIL
axs103_smp_defconfig: (gcc-8) FAIL
haps_hs_defconfig: (gcc-8) FAIL
haps_hs_smp_defconfig: (gcc-8) FAIL
hsdk_defconfig: (gcc-8) FAIL
nsim_hs_defconfig: (gcc-8) FAIL
nsim_hs_smp_defconfig: (gcc-8) FAIL
nsimosci_hs_defconfig: (gcc-8) FAIL
nsimosci_hs_smp_defconfig: (gcc-8) FAIL
vdk_hs38_defconfig: (gcc-8) FAIL
vdk_hs38_smp_defconfig: (gcc-8) FAIL
arm64:
defconfig: (gcc-8) FAIL
arm:
acs5k_defconfig: (gcc-8) FAIL
acs5k_tiny_defconfig: (gcc-8) FAIL
aspeed_g4_defconfig: (gcc-8) FAIL
aspeed_g5_defconfig: (gcc-8) FAIL
assabet_defconfig: (gcc-8) FAIL
at91_dt_defconfig: (gcc-8) FAIL
axm55xx_defconfig: (gcc-8) FAIL
badge4_defconfig: (gcc-8) FAIL
bcm2835_defconfig: (gcc-8) FAIL
cerfcube_defconfig: (gcc-8) FAIL
clps711x_defconfig: (gcc-8) FAIL
cm_x2xx_defconfig: (gcc-8) FAIL
cm_x300_defconfig: (gcc-8) FAIL
cns3420vb_defconfig: (gcc-8) FAIL
colibri_pxa270_defconfig: (gcc-8) FAIL
colibri_pxa300_defconfig: (gcc-8) FAIL
collie_defconfig: (gcc-8) FAIL
corgi_defconfig: (gcc-8) FAIL
davinci_all_defconfig: (gcc-8) FAIL
dove_defconfig: (gcc-8) FAIL
ebsa110_defconfig: (gcc-8) FAIL
em_x270_defconfig: (gcc-8) FAIL
ep93xx_defconfig: (gcc-8) FAIL
eseries_pxa_defconfig: (gcc-8) FAIL
exynos_defconfig: (gcc-8) FAIL
ezx_defconfig: (gcc-8) FAIL
footbridge_defconfig: (gcc-8) FAIL
gemini_defconfig: (gcc-8) FAIL
h3600_defconfig: (gcc-8) FAIL
h5000_defconfig: (gcc-8) FAIL
hackkit_defconfig: (gcc-8) FAIL
hisi_defconfig: (gcc-8) FAIL
imote2_defconfig: (gcc-8) FAIL
imx_v4_v5_defconfig: (gcc-8) FAIL
imx_v6_v7_defconfig: (gcc-8) FAIL
integrator_defconfig: (gcc-8) FAIL
iop13xx_defconfig: (gcc-8) FAIL
iop32x_defconfig: (gcc-8) FAIL
iop33x_defconfig: (gcc-8) FAIL
ixp4xx_defconfig: (gcc-8) FAIL
jornada720_defconfig: (gcc-8) FAIL
keystone_defconfig: (gcc-8) FAIL
ks8695_defconfig: (gcc-8) FAIL
lart_defconfig: (gcc-8) FAIL
lpc32xx_defconfig: (gcc-8) FAIL
lpd270_defconfig: (gcc-8) FAIL
lubbock_defconfig: (gcc-8) FAIL
magician_defconfig: (gcc-8) FAIL
mainstone_defconfig: (gcc-8) FAIL
mini2440_defconfig: (gcc-8) FAIL
mmp2_defconfig: (gcc-8) FAIL
moxart_defconfig: (gcc-8) FAIL
multi_v4t_defconfig: (gcc-8) FAIL
multi_v5_defconfig: (gcc-8) FAIL
multi_v7_defconfig: (gcc-8) FAIL
mv78xx0_defconfig: (gcc-8) FAIL
mvebu_v5_defconfig: (gcc-8) FAIL
mvebu_v7_defconfig: (gcc-8) FAIL
mxs_defconfig: (gcc-8) FAIL
neponset_defconfig: (gcc-8) FAIL
netwinder_defconfig: (gcc-8) FAIL
netx_defconfig: (gcc-8) FAIL
nhk8815_defconfig: (gcc-8) FAIL
nuc910_defconfig: (gcc-8) FAIL
nuc950_defconfig: (gcc-8) FAIL
nuc960_defconfig: (gcc-8) FAIL
omap2plus_defconfig: (gcc-8) FAIL
orion5x_defconfig: (gcc-8) FAIL
palmz72_defconfig: (gcc-8) FAIL
pcm027_defconfig: (gcc-8) FAIL
prima2_defconfig: (gcc-8) FAIL
pxa168_defconfig: (gcc-8) FAIL
pxa255-idp_defconfig: (gcc-8) FAIL
pxa3xx_defconfig: (gcc-8) FAIL
pxa910_defconfig: (gcc-8) FAIL
pxa_defconfig: (gcc-8) FAIL
qcom_defconfig: (gcc-8) FAIL
raumfeld_defconfig: (gcc-8) FAIL
realview_defconfig: (gcc-8) FAIL
rpc_defconfig: (gcc-8) FAIL
s3c2410_defconfig: (gcc-8) FAIL
s3c6400_defconfig: (gcc-8) FAIL
s5pv210_defconfig: (gcc-8) FAIL
sama5_defconfig: (gcc-8) FAIL
shannon_defconfig: (gcc-8) FAIL
shmobile_defconfig: (gcc-8) FAIL
simpad_defconfig: (gcc-8) FAIL
socfpga_defconfig: (gcc-8) FAIL
spear13xx_defconfig: (gcc-8) FAIL
spear3xx_defconfig: (gcc-8) FAIL
spear6xx_defconfig: (gcc-8) FAIL
spitz_defconfig: (gcc-8) FAIL
sunxi_defconfig: (gcc-8) FAIL
tango4_defconfig: (gcc-8) FAIL
tegra_defconfig: (gcc-8) FAIL
trizeps4_defconfig: (gcc-8) FAIL
u300_defconfig: (gcc-8) FAIL
u8500_defconfig: (gcc-8) FAIL
versatile_defconfig: (gcc-8) FAIL
vexpress_defconfig: (gcc-8) FAIL
vt8500_v6_v7_defconfig: (gcc-8) FAIL
zeus_defconfig: (gcc-8) FAIL
zx_defconfig: (gcc-8) FAIL
i386:
i386_defconfig: (gcc-8) FAIL
mips:
32r2el_defconfig: (gcc-8) FAIL
ar7_defconfig: (gcc-8) FAIL
ath25_defconfig: (gcc-8) FAIL
ath79_defconfig: (gcc-8) FAIL
bcm47xx_defconfig: (gcc-8) FAIL
bigsur_defconfig: (gcc-8) FAIL
bmips_be_defconfig: (gcc-8) FAIL
bmips_stb_defconfig: (gcc-8) FAIL
capcella_defconfig: (gcc-8) FAIL
cavium_octeon_defconfig: (gcc-8) FAIL
ci20_defconfig: (gcc-8) FAIL
cobalt_defconfig: (gcc-8) FAIL
db1xxx_defconfig: (gcc-8) FAIL
decstation_defconfig: (gcc-8) FAIL
e55_defconfig: (gcc-8) FAIL
fuloong2e_defconfig: (gcc-8) FAIL
gpr_defconfig: (gcc-8) FAIL
ip22_defconfig: (gcc-8) FAIL
ip27_defconfig: (gcc-8) FAIL
ip28_defconfig: (gcc-8) FAIL
ip32_defconfig: (gcc-8) FAIL
jazz_defconfig: (gcc-8) FAIL
jmr3927_defconfig: (gcc-8) FAIL
lasat_defconfig: (gcc-8) FAIL
lemote2f_defconfig: (gcc-8) FAIL
loongson1b_defconfig: (gcc-8) FAIL
loongson1c_defconfig: (gcc-8) FAIL
loongson3_defconfig: (gcc-8) FAIL
malta_defconfig: (gcc-8) FAIL
malta_kvm_defconfig: (gcc-8) FAIL
malta_kvm_guest_defconfig: (gcc-8) FAIL
malta_qemu_32r6_defconfig: (gcc-8) FAIL
maltaaprp_defconfig: (gcc-8) FAIL
maltasmvp_defconfig: (gcc-8) FAIL
maltasmvp_eva_defconfig: (gcc-8) FAIL
maltaup_defconfig: (gcc-8) FAIL
maltaup_xpa_defconfig: (gcc-8) FAIL
markeins_defconfig: (gcc-8) FAIL
mips_paravirt_defconfig: (gcc-8) FAIL
mpc30x_defconfig: (gcc-8) FAIL
mtx1_defconfig: (gcc-8) FAIL
nlm_xlp_defconfig: (gcc-8) FAIL
nlm_xlr_defconfig: (gcc-8) FAIL
omega2p_defconfig: (gcc-8) FAIL
pic32mzda_defconfig: (gcc-8) FAIL
pistachio_defconfig: (gcc-8) FAIL
pnx8335_stb225_defconfig: (gcc-8) FAIL
qi_lb60_defconfig: (gcc-8) FAIL
rb532_defconfig: (gcc-8) FAIL
rbtx49xx_defconfig: (gcc-8) FAIL
rm200_defconfig: (gcc-8) FAIL
rt305x_defconfig: (gcc-8) FAIL
sb1250_swarm_defconfig: (gcc-8) FAIL
tb0219_defconfig: (gcc-8) FAIL
tb0226_defconfig: (gcc-8) FAIL
tb0287_defconfig: (gcc-8) FAIL
vocore2_defconfig: (gcc-8) FAIL
workpad_defconfig: (gcc-8) FAIL
xilfpga_defconfig: (gcc-8) FAIL
xway_defconfig: (gcc-8) FAIL
x86_64:
x86_64_defconfig: (gcc-8) FAIL
Errors and Warnings Detected:
arc:
axs103_defconfig (gcc-8): 1 error, 2 warnings
axs103_smp_defconfig (gcc-8): 1 error, 2 warnings
haps_hs_defconfig (gcc-8): 1 error, 2 warnings
haps_hs_smp_defconfig (gcc-8): 1 error, 2 warnings
hsdk_defconfig (gcc-8): 1 error, 2 warnings
nsim_hs_defconfig (gcc-8): 1 error, 2 warnings
nsim_hs_smp_defconfig (gcc-8): 1 error, 2 warnings
nsimosci_hs_defconfig (gcc-8): 1 error, 2 warnings
nsimosci_hs_smp_defconfig (gcc-8): 1 error, 2 warnings
vdk_hs38_defconfig (gcc-8): 1 error, 2 warnings
vdk_hs38_smp_defconfig (gcc-8): 1 error, 2 warnings
arm64:
allnoconfig (gcc-8): 2 warnings
defconfig (gcc-8): 1 error, 3 warnings
tinyconfig (gcc-8): 2 warnings
arm:
acs5k_defconfig (gcc-8): 1 error, 3 warnings
acs5k_tiny_defconfig (gcc-8): 1 error, 3 warnings
aspeed_g4_defconfig (gcc-8): 1 error, 3 warnings
aspeed_g5_defconfig (gcc-8): 1 error, 3 warnings
assabet_defconfig (gcc-8): 1 error, 3 warnings
at91_dt_defconfig (gcc-8): 1 error, 2 warnings
axm55xx_defconfig (gcc-8): 1 error, 3 warnings
badge4_defconfig (gcc-8): 1 error, 3 warnings
bcm2835_defconfig (gcc-8): 1 error, 2 warnings
cerfcube_defconfig (gcc-8): 1 error, 3 warnings
clps711x_defconfig (gcc-8): 1 error, 3 warnings
cm_x2xx_defconfig (gcc-8): 1 error, 2 warnings
cm_x300_defconfig (gcc-8): 1 error, 3 warnings
cns3420vb_defconfig (gcc-8): 1 error, 3 warnings
colibri_pxa270_defconfig (gcc-8): 1 error, 3 warnings
colibri_pxa300_defconfig (gcc-8): 1 error, 3 warnings
collie_defconfig (gcc-8): 1 error, 3 warnings
corgi_defconfig (gcc-8): 1 error, 3 warnings
davinci_all_defconfig (gcc-8): 1 error, 3 warnings
dove_defconfig (gcc-8): 1 error, 3 warnings
ebsa110_defconfig (gcc-8): 1 error, 3 warnings
em_x270_defconfig (gcc-8): 1 error, 2 warnings
ep93xx_defconfig (gcc-8): 1 error, 3 warnings
eseries_pxa_defconfig (gcc-8): 1 error, 3 warnings
exynos_defconfig (gcc-8): 1 error, 3 warnings
ezx_defconfig (gcc-8): 1 error, 3 warnings
footbridge_defconfig (gcc-8): 1 error, 3 warnings
gemini_defconfig (gcc-8): 1 error, 3 warnings
h3600_defconfig (gcc-8): 1 error, 3 warnings
h5000_defconfig (gcc-8): 1 error, 2 warnings
hackkit_defconfig (gcc-8): 1 error, 3 warnings
hisi_defconfig (gcc-8): 1 error, 3 warnings
imote2_defconfig (gcc-8): 1 error, 3 warnings
imx_v4_v5_defconfig (gcc-8): 1 error, 2 warnings
imx_v6_v7_defconfig (gcc-8): 1 error, 3 warnings
integrator_defconfig (gcc-8): 1 error, 3 warnings
iop13xx_defconfig (gcc-8): 1 error, 3 warnings
iop32x_defconfig (gcc-8): 1 error, 3 warnings
iop33x_defconfig (gcc-8): 1 error, 3 warnings
ixp4xx_defconfig (gcc-8): 1 error, 3 warnings
jornada720_defconfig (gcc-8): 1 error, 3 warnings
keystone_defconfig (gcc-8): 1 error, 3 warnings
ks8695_defconfig (gcc-8): 1 error, 3 warnings
lart_defconfig (gcc-8): 1 error, 3 warnings
lpc32xx_defconfig (gcc-8): 1 error, 2 warnings
lpd270_defconfig (gcc-8): 1 error, 3 warnings
lubbock_defconfig (gcc-8): 1 error, 3 warnings
magician_defconfig (gcc-8): 1 error, 3 warnings
mainstone_defconfig (gcc-8): 1 error, 3 warnings
mini2440_defconfig (gcc-8): 1 error, 3 warnings
mmp2_defconfig (gcc-8): 1 error, 3 warnings
moxart_defconfig (gcc-8): 1 error, 3 warnings
multi_v4t_defconfig (gcc-8): 1 error, 3 warnings
multi_v5_defconfig (gcc-8): 1 error, 3 warnings
multi_v7_defconfig (gcc-8): 1 error, 3 warnings
mv78xx0_defconfig (gcc-8): 1 error, 3 warnings
mvebu_v5_defconfig (gcc-8): 1 error, 3 warnings
mvebu_v7_defconfig (gcc-8): 1 error, 3 warnings
mxs_defconfig (gcc-8): 1 error, 3 warnings
neponset_defconfig (gcc-8): 1 error, 3 warnings
netwinder_defconfig (gcc-8): 1 error, 3 warnings
netx_defconfig (gcc-8): 1 error, 3 warnings
nhk8815_defconfig (gcc-8): 1 error, 3 warnings
nuc910_defconfig (gcc-8): 1 error, 3 warnings
nuc950_defconfig (gcc-8): 1 error, 3 warnings
nuc960_defconfig (gcc-8): 1 error, 3 warnings
omap2plus_defconfig (gcc-8): 1 error, 2 warnings
orion5x_defconfig (gcc-8): 1 error, 3 warnings
palmz72_defconfig (gcc-8): 1 error, 3 warnings
pcm027_defconfig (gcc-8): 1 error, 3 warnings
prima2_defconfig (gcc-8): 1 error, 3 warnings
pxa168_defconfig (gcc-8): 1 error, 3 warnings
pxa255-idp_defconfig (gcc-8): 1 error, 3 warnings
pxa3xx_defconfig (gcc-8): 1 error, 3 warnings
pxa910_defconfig (gcc-8): 1 error, 3 warnings
pxa_defconfig (gcc-8): 1 error, 3 warnings
qcom_defconfig (gcc-8): 1 error, 3 warnings
raumfeld_defconfig (gcc-8): 1 error, 3 warnings
realview_defconfig (gcc-8): 1 error, 3 warnings
rpc_defconfig (gcc-8): 1 error, 3 warnings
s3c2410_defconfig (gcc-8): 1 error, 2 warnings
s3c6400_defconfig (gcc-8): 1 error, 3 warnings
s5pv210_defconfig (gcc-8): 1 error, 3 warnings
sama5_defconfig (gcc-8): 1 error, 3 warnings
shannon_defconfig (gcc-8): 1 error, 3 warnings
shmobile_defconfig (gcc-8): 1 error, 2 warnings
simpad_defconfig (gcc-8): 1 error, 3 warnings
socfpga_defconfig (gcc-8): 1 error, 3 warnings
spear13xx_defconfig (gcc-8): 1 error, 3 warnings
spear3xx_defconfig (gcc-8): 1 error, 3 warnings
spear6xx_defconfig (gcc-8): 1 error, 3 warnings
spitz_defconfig (gcc-8): 1 error, 3 warnings
sunxi_defconfig (gcc-8): 1 error, 3 warnings
tango4_defconfig (gcc-8): 1 error, 3 warnings
tegra_defconfig (gcc-8): 1 error, 3 warnings
trizeps4_defconfig (gcc-8): 1 error, 3 warnings
u300_defconfig (gcc-8): 1 error, 3 warnings
u8500_defconfig (gcc-8): 1 error, 3 warnings
versatile_defconfig (gcc-8): 1 error, 3 warnings
vexpress_defconfig (gcc-8): 1 error, 3 warnings
vt8500_v6_v7_defconfig (gcc-8): 1 error, 3 warnings
zeus_defconfig (gcc-8): 1 error, 3 warnings
zx_defconfig (gcc-8): 1 error, 3 warnings
i386:
i386_defconfig (gcc-8): 1 error, 3 warnings
mips:
32r2el_defconfig (gcc-8): 1 error, 2 warnings
ar7_defconfig (gcc-8): 1 error, 2 warnings
ath25_defconfig (gcc-8): 1 error, 2 warnings
ath79_defconfig (gcc-8): 1 error, 2 warnings
bcm47xx_defconfig (gcc-8): 1 error, 2 warnings
bigsur_defconfig (gcc-8): 1 error, 2 warnings
bmips_be_defconfig (gcc-8): 1 error, 2 warnings
bmips_stb_defconfig (gcc-8): 1 error, 2 warnings
capcella_defconfig (gcc-8): 1 error, 2 warnings
cavium_octeon_defconfig (gcc-8): 1 error, 2 warnings
ci20_defconfig (gcc-8): 1 error, 2 warnings
cobalt_defconfig (gcc-8): 1 error, 2 warnings
db1xxx_defconfig (gcc-8): 1 error, 2 warnings
decstation_defconfig (gcc-8): 1 error, 2 warnings
e55_defconfig (gcc-8): 1 error, 2 warnings
fuloong2e_defconfig (gcc-8): 1 error, 2 warnings
gpr_defconfig (gcc-8): 1 error, 2 warnings
ip22_defconfig (gcc-8): 1 error, 2 warnings
ip27_defconfig (gcc-8): 1 error, 2 warnings
ip28_defconfig (gcc-8): 1 error, 2 warnings
ip32_defconfig (gcc-8): 1 error, 2 warnings
jazz_defconfig (gcc-8): 1 error, 2 warnings
jmr3927_defconfig (gcc-8): 1 error, 2 warnings
lasat_defconfig (gcc-8): 1 error, 2 warnings
lemote2f_defconfig (gcc-8): 1 error, 2 warnings
loongson1b_defconfig (gcc-8): 1 error, 2 warnings
loongson1c_defconfig (gcc-8): 1 error, 2 warnings
loongson3_defconfig (gcc-8): 1 error, 2 warnings
malta_defconfig (gcc-8): 1 error, 2 warnings
malta_kvm_defconfig (gcc-8): 1 error, 2 warnings
malta_kvm_guest_defconfig (gcc-8): 1 error, 2 warnings
malta_qemu_32r6_defconfig (gcc-8): 1 error, 2 warnings
maltaaprp_defconfig (gcc-8): 1 error, 2 warnings
maltasmvp_defconfig (gcc-8): 1 error, 2 warnings
maltasmvp_eva_defconfig (gcc-8): 1 error, 2 warnings
maltaup_defconfig (gcc-8): 1 error, 2 warnings
maltaup_xpa_defconfig (gcc-8): 1 error, 2 warnings
markeins_defconfig (gcc-8): 1 error, 2 warnings
mips_paravirt_defconfig (gcc-8): 1 error, 2 warnings
mpc30x_defconfig (gcc-8): 1 error, 2 warnings
mtx1_defconfig (gcc-8): 1 error, 2 warnings
nlm_xlp_defconfig (gcc-8): 1 error, 2 warnings
nlm_xlr_defconfig (gcc-8): 1 error, 2 warnings
omega2p_defconfig (gcc-8): 1 error, 2 warnings
pic32mzda_defconfig (gcc-8): 1 error, 2 warnings
pistachio_defconfig (gcc-8): 1 error, 2 warnings
pnx8335_stb225_defconfig (gcc-8): 1 error, 2 warnings
qi_lb60_defconfig (gcc-8): 1 error, 2 warnings
rb532_defconfig (gcc-8): 1 error, 2 warnings
rbtx49xx_defconfig (gcc-8): 1 error, 2 warnings
rm200_defconfig (gcc-8): 1 error, 2 warnings
rt305x_defconfig (gcc-8): 1 error, 2 warnings
sb1250_swarm_defconfig (gcc-8): 1 error, 2 warnings
tb0219_defconfig (gcc-8): 1 error, 2 warnings
tb0226_defconfig (gcc-8): 1 error, 2 warnings
tb0287_defconfig (gcc-8): 1 error, 2 warnings
vocore2_defconfig (gcc-8): 1 error, 2 warnings
workpad_defconfig (gcc-8): 1 error, 2 warnings
xilfpga_defconfig (gcc-8): 1 error, 2 warnings
xway_defconfig (gcc-8): 1 error, 2 warnings
x86_64:
tinyconfig (gcc-8): 1 warning
x86_64_defconfig (gcc-8): 1 error, 3 warnings
Errors summary:
177 mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings summary:
177 mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
177 cc1: some warnings being treated as errors
96 fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2 arch/arm64/kernel/cpufeature.c:940:13: warning: ‘cpu_copy_el2regs’ defined but not used [-Wunused-function]
2 arch/arm64/kernel/cpufeature.c:802:13: warning: ‘runs_at_el2’ defined but not used [-Wunused-function]
1 .config:1027:warning: override: UNWINDER_GUESS changes choice state
================================================================================
Detailed per-defconfig build reports:
--------------------------------------------------------------------------------
32r2el_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
acs5k_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
acs5k_tiny_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
allnoconfig (i386, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (mips, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (x86_64, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (arc, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (arm64, gcc-8) — PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
arch/arm64/kernel/cpufeature.c:940:13: warning: ‘cpu_copy_el2regs’ defined but not used [-Wunused-function]
arch/arm64/kernel/cpufeature.c:802:13: warning: ‘runs_at_el2’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
am200epdkit_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ar7_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
aspeed_g4_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
aspeed_g5_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
assabet_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
at91_dt_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ath25_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ath79_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
axm55xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
axs103_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
axs103_smp_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
badge4_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
bcm2835_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
bcm47xx_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
bcm63xx_defconfig (mips, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
bigsur_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
bmips_be_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
bmips_stb_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
capcella_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
cavium_octeon_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
cerfcube_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
ci20_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
clps711x_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
cm_x2xx_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
cm_x300_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
cns3420vb_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
cobalt_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
colibri_pxa270_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
colibri_pxa300_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
collie_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
corgi_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
davinci_all_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
db1xxx_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
decstation_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
defconfig (arm64, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
dove_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
e55_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ebsa110_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
efm32_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
em_x270_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ep93xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
eseries_pxa_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
exynos_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
ezx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
footbridge_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
fuloong2e_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
gemini_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
gpr_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
h3600_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
h5000_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
hackkit_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
haps_hs_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
haps_hs_smp_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
hisi_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
hsdk_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
i386_defconfig (i386, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
imote2_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
imx_v4_v5_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
imx_v6_v7_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
integrator_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
iop13xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
iop32x_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
iop33x_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
ip22_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ip27_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ip28_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ip32_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
ixp4xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
jazz_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
jmr3927_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
jornada720_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
keystone_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
ks8695_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
lart_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
lasat_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
lemote2f_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
loongson1b_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
loongson1c_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
loongson3_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
lpc18xx_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
lpc32xx_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
lpd270_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
lubbock_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
magician_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mainstone_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
malta_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
malta_kvm_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
malta_kvm_guest_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
malta_qemu_32r6_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
maltaaprp_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
maltasmvp_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
maltasmvp_eva_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
maltaup_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
maltaup_xpa_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
markeins_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
mini2440_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mips_paravirt_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
mmp2_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
moxart_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mpc30x_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
mps2_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
msp71xx_defconfig (mips, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mtx1_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
multi_v4t_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
multi_v5_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
multi_v7_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mv78xx0_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mvebu_v5_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mvebu_v7_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
mxs_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
neponset_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
netwinder_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
netx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
nhk8815_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
nlm_xlp_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nlm_xlr_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nsim_hs_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nsim_hs_smp_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nsimosci_hs_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nsimosci_hs_smp_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
nuc910_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
nuc950_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
nuc960_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
omap1_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
omap2plus_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
omega2p_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
orion5x_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
palmz72_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pcm027_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pic32mzda_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
pistachio_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
pleb_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pnx8335_stb225_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
prima2_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pxa168_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pxa255-idp_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pxa3xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pxa910_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
pxa_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
qcom_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
qi_lb60_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
raumfeld_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
rb532_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
rbtx49xx_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
realview_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
rm200_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
rpc_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
rt305x_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
s3c2410_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
s3c6400_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
s5pv210_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
sama5_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
sb1250_swarm_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
shannon_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
shmobile_defconfig (arm, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
simpad_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
socfpga_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
spear13xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
spear3xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
spear6xx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
spitz_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
stm32_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
sunxi_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
tango4_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
tb0219_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
tb0226_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
tb0287_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
tct_hammer_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tegra_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
tinyconfig (arc, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (mips, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (i386, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (arm64, gcc-8) — PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
arch/arm64/kernel/cpufeature.c:940:13: warning: ‘cpu_copy_el2regs’ defined but not used [-Wunused-function]
arch/arm64/kernel/cpufeature.c:802:13: warning: ‘runs_at_el2’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
tinyconfig (x86_64, gcc-8) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
.config:1027:warning: override: UNWINDER_GUESS changes choice state
--------------------------------------------------------------------------------
trizeps4_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
u300_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
u8500_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
vdk_hs38_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
vdk_hs38_smp_defconfig (arc, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
versatile_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
vexpress_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
viper_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vocore2_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
vt8500_v6_v7_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
workpad_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
x86_64_defconfig (x86_64, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
xcep_defconfig (arm, gcc-8) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
xilfpga_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
xway_defconfig (mips, gcc-8) — FAIL, 1 error, 2 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--------------------------------------------------------------------------------
zeus_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
--------------------------------------------------------------------------------
zx_defconfig (arm, gcc-8) — FAIL, 1 error, 3 warnings, 0 section mismatches
Errors:
mm/shmem.c:1977:11: error: implicit declaration of function ‘maybe_unlock_mmap_for_io’ [-Werror=implicit-function-declaration]
Warnings:
mm/shmem.c:1977:9: warning: assignment to ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
fs/proc/task_mmu.c:761:7: warning: ‘last_vma’ may be used uninitialized in this function [-Wmaybe-uninitialized]
---
For more info write to <info(a)kernelci.org>
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 0ac1f929c75c - Linux 5.4.8-rc1
The results of these automated tests are provided below.
Overall result: FAILED (see details below)
Merge: OK
Compile: FAILED
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/360466
We attempted to compile the kernel for multiple architectures, but the compile
failed on one or more architectures:
aarch64: FAILED (see build-aarch64.log.xz attachment)
ppc64le: FAILED (see build-ppc64le.log.xz attachment)
x86_64: FAILED (see build-x86_64.log.xz attachment)
We hope that these logs can help you find the problem quickly. For the full
detail on our testing procedures, please scroll to the bottom of this message.
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
From: Anders Kaseorg <andersk(a)mit.edu>
This reverts commit 968dcfb4905245dc64d65312c0d17692fa087b99.
Both that commit and commit 809805a820c6445f7a701ded24fdc6bbc841d1e4
attempted to fix the same bug (dead assignments to the local variable
cfg), but they did so in incompatible ways. When they were both merged,
independently of each other, the combination actually caused the bug to
reappear, leading to a firmware crash on boot for some cards.
https://bugzilla.kernel.org/show_bug.cgi?id=205719
Signed-off-by: Anders Kaseorg <andersk(a)mit.edu>
Acked-by: Luca Coelho <luciano.coelho(a)intel.com>
Signed-off-by: Kalle Valo <kvalo(a)codeaurora.org>
---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 040cec17d3ad..b0b7eca1754e 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1111,18 +1111,18 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* same thing for QuZ... */
if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QUZ) {
- if (iwl_trans->cfg == &iwl_ax101_cfg_qu_hr)
- iwl_trans->cfg = &iwl_ax101_cfg_quz_hr;
- else if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr)
- iwl_trans->cfg = &iwl_ax201_cfg_quz_hr;
- else if (iwl_trans->cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0)
- iwl_trans->cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc;
- else if (iwl_trans->cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0)
- iwl_trans->cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc;
- else if (iwl_trans->cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0)
- iwl_trans->cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc;
- else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
- iwl_trans->cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc;
+ if (cfg == &iwl_ax101_cfg_qu_hr)
+ cfg = &iwl_ax101_cfg_quz_hr;
+ else if (cfg == &iwl_ax201_cfg_qu_hr)
+ cfg = &iwl_ax201_cfg_quz_hr;
+ else if (cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0)
+ cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc;
+ else if (cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0)
+ cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc;
+ else if (cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0)
+ cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc;
+ else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
+ cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc;
}
#endif
--
2.24.0
The patch titled
Subject: ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less
has been added to the -mm tree. Its filename is
ocfs2-fix-the-crash-due-to-call-ocfs2_get_dlm_debug-once-less.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-fix-the-crash-due-to-call-oc…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-fix-the-crash-due-to-call-oc…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Gang He <GHe(a)suse.com>
Subject: ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less
Because ocfs2_get_dlm_debug() function is called once less here, ocfs2
file system will trigger the system crash, usually after ocfs2 file system
is unmounted.
This system crash is caused by a generic memory corruption, these crash
backtraces are not always the same, for exapmle,
[ 4106.597432] ocfs2: Unmounting device (253,16) on (node 172167785)
[ 4116.230719] general protection fault: 0000 [#1] SMP PTI
[ 4116.230731] CPU: 3 PID: 14107 Comm: fence_legacy Kdump:
[ 4116.230737] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
[ 4116.230772] RIP: 0010:__kmalloc+0xa5/0x2a0
[ 4116.230778] Code: 00 00 4d 8b 07 65 4d 8b
[ 4116.230785] RSP: 0018:ffffaa1fc094bbe8 EFLAGS: 00010286
[ 4116.230790] RAX: 0000000000000000 RBX: d310a8800d7a3faf RCX: 0000000000000000
[ 4116.230794] RDX: 0000000000000000 RSI: 0000000000000dc0 RDI: ffff96e68fc036c0
[ 4116.230798] RBP: d310a8800d7a3faf R08: ffff96e6ffdb10a0 R09: 00000000752e7079
[ 4116.230802] R10: 000000000001c513 R11: 0000000004091041 R12: 0000000000000dc0
[ 4116.230806] R13: 0000000000000039 R14: ffff96e68fc036c0 R15: ffff96e68fc036c0
[ 4116.230811] FS: 00007f699dfba540(0000) GS:ffff96e6ffd80000(0000) knlGS:00000
[ 4116.230815] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4116.230819] CR2: 000055f3a9d9b768 CR3: 000000002cd1c000 CR4: 00000000000006e0
[ 4116.230833] Call Trace:
[ 4116.230898] ? ext4_htree_store_dirent+0x35/0x100 [ext4]
[ 4116.230924] ext4_htree_store_dirent+0x35/0x100 [ext4]
[ 4116.230957] htree_dirblock_to_tree+0xea/0x290 [ext4]
[ 4116.230989] ext4_htree_fill_tree+0x1c1/0x2d0 [ext4]
[ 4116.231027] ext4_readdir+0x67c/0x9d0 [ext4]
[ 4116.231040] iterate_dir+0x8d/0x1a0
[ 4116.231056] __x64_sys_getdents+0xab/0x130
[ 4116.231063] ? iterate_dir+0x1a0/0x1a0
[ 4116.231076] ? do_syscall_64+0x60/0x1f0
[ 4116.231080] ? __ia32_sys_getdents+0x130/0x130
[ 4116.231086] do_syscall_64+0x60/0x1f0
[ 4116.231151] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 4116.231168] RIP: 0033:0x7f699d33a9fb
This regression problem was introduced by commit e581595ea29c ("ocfs: no
need to check return value of debugfs_create functions").
Link: http://lkml.kernel.org/r/20191225061501.13587-1-ghe@suse.com
Fixes: e581595ea29c ("ocfs: no need to check return value of debugfs_create functions")
Signed-off-by: Gang He <ghe(a)suse.com>
Acked-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: <stable(a)vger.kernel.org> [5.3+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/dlmglue.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/ocfs2/dlmglue.c~ocfs2-fix-the-crash-due-to-call-ocfs2_get_dlm_debug-once-less
+++ a/fs/ocfs2/dlmglue.c
@@ -3282,6 +3282,7 @@ static void ocfs2_dlm_init_debug(struct
debugfs_create_u32("locking_filter", 0600, osb->osb_debug_root,
&dlm_debug->d_filter_secs);
+ ocfs2_get_dlm_debug(dlm_debug);
}
static void ocfs2_dlm_shutdown_debug(struct ocfs2_super *osb)
_
Patches currently in -mm which might be from GHe(a)suse.com are
ocfs2-fix-the-crash-due-to-call-ocfs2_get_dlm_debug-once-less.patch
The patch
spi: spi-fsl-dspi: Fix 16-bit word order in 32-bit XSPI mode
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From ca59d5a51690d5b9340343dc36792a252e9414ae Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv(a)gmail.com>
Date: Sat, 28 Dec 2019 15:55:36 +0200
Subject: [PATCH] spi: spi-fsl-dspi: Fix 16-bit word order in 32-bit XSPI mode
When used in Extended SPI mode on LS1021A, the DSPI controller wants to
have the least significant 16-bit word written first to the TX FIFO.
In fact, the LS1021A reference manual says:
33.5.2.4.2 Draining the TX FIFO
When Extended SPI Mode (DSPIx_MCR[XSPI]) is enabled, if the frame size
of SPI Data to be transmitted is more than 16 bits, then it causes two
Data entries to be popped from TX FIFO simultaneously which are
transferred to the shift register. The first of the two popped entries
forms the 16 least significant bits of the SPI frame to be transmitted.
So given the following TX buffer:
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | 0x5 | 0x6 | 0x7 | 0x8 | 0x9 | 0xa | 0xb |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| 32-bit word 1 | 32-bit word 2 | 32-bit word 3 |
+-----------------------+-----------------------+-----------------------+
The correct way that a little-endian system should transmit it on the
wire when bits_per_word is 32 is:
0x03020100
0x07060504
0x0b0a0908
But it is actually transmitted as following, as seen with a scope:
0x01000302
0x05040706
0x09080b0a
It appears that this patch has been submitted at least once before:
https://lkml.org/lkml/2018/9/21/286
but in that case Chuanhua Han did not manage to explain the problem
clearly enough and the patch did not get merged, leaving XSPI mode
broken.
Fixes: 8fcd151d2619 ("spi: spi-fsl-dspi: XSPI FIFO handling (in TCFQ mode)")
Cc: Esben Haabendal <eha(a)deif.com>
Cc: Chuanhua Han <chuanhua.han(a)nxp.com>
Signed-off-by: Vladimir Oltean <olteanv(a)gmail.com>
Link: https://lore.kernel.org/r/20191228135536.14284-1-olteanv@gmail.com
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Cc: stable(a)vger.kernel.org
---
drivers/spi/spi-fsl-dspi.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 9c3934efe2b1..8428b69c858b 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -587,21 +587,14 @@ static void dspi_tcfq_write(struct fsl_dspi *dspi)
dspi->tx_cmd |= SPI_PUSHR_CMD_CTCNT;
if (dspi->devtype_data->xspi_mode && dspi->bits_per_word > 16) {
- /* Write two TX FIFO entries first, and then the corresponding
- * CMD FIFO entry.
+ /* Write the CMD FIFO entry first, and then the two
+ * corresponding TX FIFO entries.
*/
u32 data = dspi_pop_tx(dspi);
- if (dspi->cur_chip->ctar_val & SPI_CTAR_LSBFE) {
- /* LSB */
- tx_fifo_write(dspi, data & 0xFFFF);
- tx_fifo_write(dspi, data >> 16);
- } else {
- /* MSB */
- tx_fifo_write(dspi, data >> 16);
- tx_fifo_write(dspi, data & 0xFFFF);
- }
cmd_fifo_write(dspi);
+ tx_fifo_write(dspi, data & 0xFFFF);
+ tx_fifo_write(dspi, data >> 16);
} else {
/* Write one entry to both TX FIFO and CMD FIFO
* simultaneously.
--
2.20.1
Hi Sasha,
These build issues can be fixed by including linux/nospec.h to
arch/x86/kvm/mtrr.c. Below you can find a patch that compiles on both
v4.9.206 and v4.4.206.
Please let me know if you need anything else.
Marios
========
diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c
index 0149ac59c273..f223f1315998 100644
--- a/arch/x86/kvm/mtrr.c
+++ b/arch/x86/kvm/mtrr.c
@@ -18,6 +18,7 @@
#include <linux/kvm_host.h>
#include <asm/mtrr.h>
+#include <linux/nospec.h>
#include "cpuid.h"
#include "mmu.h"
@@ -202,11 +203,15 @@ static bool fixed_msr_to_seg_unit(u32 msr, int
*seg, int *unit)
break;
case MSR_MTRRfix16K_80000 ... MSR_MTRRfix16K_A0000:
*seg = 1;
- *unit = msr - MSR_MTRRfix16K_80000;
+ *unit = array_index_nospec(
+ msr - MSR_MTRRfix16K_80000,
+ MSR_MTRRfix16K_A0000 - MSR_MTRRfix16K_80000 + 1);
break;
case MSR_MTRRfix4K_C0000 ... MSR_MTRRfix4K_F8000:
*seg = 2;
- *unit = msr - MSR_MTRRfix4K_C0000;
+ *unit = array_index_nospec(
+ msr - MSR_MTRRfix4K_C0000,
+ MSR_MTRRfix4K_F8000 - MSR_MTRRfix4K_C0000 + 1);
break;
default:
return false;
On Wed, Dec 25, 2019 at 3:55 PM Sasha Levin <sashal(a)kernel.org> wrote:
>
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: de9aef5e1ad6 ("KVM: MTRR: introduce fixed_mtrr_segment table").
>
> The bot has tested the following trees: v5.4.5, v5.3.18, v4.19.90, v4.14.159, v4.9.206, v4.4.206.
>
> v5.4.5: Build OK!
> v5.3.18: Build OK!
> v4.19.90: Build OK!
> v4.14.159: Build OK!
> v4.9.206: Build failed! Errors:
> arch/x86/kvm/mtrr.c:205:11: error: implicit declaration of function ‘array_index_nospec’; did you mean ‘array_index_mask_nospec’? [-Werror=implicit-function-declaration]
>
> v4.4.206: Build failed! Errors:
> arch/x86/kvm/mtrr.c:205:11: error: implicit declaration of function ‘array_index_nospec’; did you mean ‘array_index_mask_nospec’? [-Werror=implicit-function-declaration]
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
>
> --
> Thanks,
> Sasha
--
Marios Pomonis
Software Engineer, Security
GCP Platform Security
US-KIR-6THC
This is a note to let you know that I've just added the patch titled
USB: core: fix check for duplicate endpoints
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan(a)kernel.org>
Date: Thu, 19 Dec 2019 17:10:16 +0100
Subject: USB: core: fix check for duplicate endpoints
Amend the endpoint-descriptor sanity checks to detect all duplicate
endpoint addresses in a configuration.
Commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint
addresses") added a check for duplicate endpoint addresses within a
single alternate setting, but did not look for duplicate addresses in
other interfaces.
The current check would also not detect all duplicate addresses when one
endpoint is as a (bi-directional) control endpoint.
This specifically avoids overwriting the endpoint entries in struct
usb_device when enabling a duplicate endpoint, something which could
potentially lead to crashes or leaks, for example, when endpoints are
later disabled.
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
Acked-by: Alan Stern <stern(a)rowland.harvard.edu>
Link: https://lore.kernel.org/r/20191219161016.6695-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/core/config.c | 70 ++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 5f40117e68e7..21291950cc97 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -203,9 +203,58 @@ static const unsigned short super_speed_maxpacket_maxes[4] = {
[USB_ENDPOINT_XFER_INT] = 1024,
};
-static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
- int asnum, struct usb_host_interface *ifp, int num_ep,
- unsigned char *buffer, int size)
+static bool endpoint_is_duplicate(struct usb_endpoint_descriptor *e1,
+ struct usb_endpoint_descriptor *e2)
+{
+ if (e1->bEndpointAddress == e2->bEndpointAddress)
+ return true;
+
+ if (usb_endpoint_xfer_control(e1) || usb_endpoint_xfer_control(e2)) {
+ if (usb_endpoint_num(e1) == usb_endpoint_num(e2))
+ return true;
+ }
+
+ return false;
+}
+
+/*
+ * Check for duplicate endpoint addresses in other interfaces and in the
+ * altsetting currently being parsed.
+ */
+static bool config_endpoint_is_duplicate(struct usb_host_config *config,
+ int inum, int asnum, struct usb_endpoint_descriptor *d)
+{
+ struct usb_endpoint_descriptor *epd;
+ struct usb_interface_cache *intfc;
+ struct usb_host_interface *alt;
+ int i, j, k;
+
+ for (i = 0; i < config->desc.bNumInterfaces; ++i) {
+ intfc = config->intf_cache[i];
+
+ for (j = 0; j < intfc->num_altsetting; ++j) {
+ alt = &intfc->altsetting[j];
+
+ if (alt->desc.bInterfaceNumber == inum &&
+ alt->desc.bAlternateSetting != asnum)
+ continue;
+
+ for (k = 0; k < alt->desc.bNumEndpoints; ++k) {
+ epd = &alt->endpoint[k].desc;
+
+ if (endpoint_is_duplicate(epd, d))
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+static int usb_parse_endpoint(struct device *ddev, int cfgno,
+ struct usb_host_config *config, int inum, int asnum,
+ struct usb_host_interface *ifp, int num_ep,
+ unsigned char *buffer, int size)
{
unsigned char *buffer0 = buffer;
struct usb_endpoint_descriptor *d;
@@ -242,13 +291,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
goto skip_to_next_endpoint_or_interface_descriptor;
/* Check for duplicate endpoint addresses */
- for (i = 0; i < ifp->desc.bNumEndpoints; ++i) {
- if (ifp->endpoint[i].desc.bEndpointAddress ==
- d->bEndpointAddress) {
- dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
- cfgno, inum, asnum, d->bEndpointAddress);
- goto skip_to_next_endpoint_or_interface_descriptor;
- }
+ if (config_endpoint_is_duplicate(config, inum, asnum, d)) {
+ dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
+ cfgno, inum, asnum, d->bEndpointAddress);
+ goto skip_to_next_endpoint_or_interface_descriptor;
}
endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints];
@@ -522,8 +568,8 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
if (((struct usb_descriptor_header *) buffer)->bDescriptorType
== USB_DT_INTERFACE)
break;
- retval = usb_parse_endpoint(ddev, cfgno, inum, asnum, alt,
- num_ep, buffer, size);
+ retval = usb_parse_endpoint(ddev, cfgno, config, inum, asnum,
+ alt, num_ep, buffer, size);
if (retval < 0)
return retval;
++n;
--
2.24.1
This is a note to let you know that I've just added the patch titled
tty: always relink the port
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 273f632912f1b24b642ba5b7eb5022e43a72f3b5 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
Date: Fri, 27 Dec 2019 17:44:34 +0000
Subject: tty: always relink the port
If the serial device is disconnected and reconnected, it re-enumerates
properly but does not link it. fwiw, linking means just saving the port
index, so allow it always as there is no harm in saving the same value
again even if it tries to relink with the same port.
Fixes: fb2b90014d78 ("tty: link tty and port before configuring it as console")
Reported-by: Kenneth R. Crudup <kenny(a)panix.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191227174434.12057-1-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/tty_port.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 5023c85ebc6e..044c3cbdcfa4 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -89,8 +89,7 @@ void tty_port_link_device(struct tty_port *port,
{
if (WARN_ON(index >= driver->num))
return;
- if (!driver->ports[index])
- driver->ports[index] = port;
+ driver->ports[index] = port;
}
EXPORT_SYMBOL_GPL(tty_port_link_device);
--
2.24.1
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: e278af89f1ba0a9ef20947db6afc2c9afa37e85b
Gitweb: https://git.kernel.org/tip/e278af89f1ba0a9ef20947db6afc2c9afa37e85b
Author: Qian Cai <cai(a)lca.pw>
AuthorDate: Tue, 10 Dec 2019 22:30:42 -05:00
Committer: Borislav Petkov <bp(a)suse.de>
CommitterDate: Mon, 30 Dec 2019 19:25:59 +01:00
x86/resctrl: Fix an imbalance in domain_remove_cpu()
A system that supports resource monitoring may have multiple resources
while not all of these resources are capable of monitoring. Monitoring
related state is initialized only for resources that are capable of
monitoring and correspondingly this state should subsequently only be
removed from these resources that are capable of monitoring.
domain_add_cpu() calls domain_setup_mon_state() only when r->mon_capable
is true where it will initialize d->mbm_over. However,
domain_remove_cpu() calls cancel_delayed_work(&d->mbm_over) without
checking r->mon_capable resulting in an attempt to cancel d->mbm_over on
all resources, even those that never initialized d->mbm_over because
they are not capable of monitoring. Hence, it triggers a debugobjects
warning when offlining CPUs because those timer debugobjects are never
initialized:
ODEBUG: assert_init not available (active state 0) object type:
timer_list hint: 0x0
WARNING: CPU: 143 PID: 789 at lib/debugobjects.c:484
debug_print_object
Hardware name: HP Synergy 680 Gen9/Synergy 680 Gen9 Compute Module, BIOS I40 05/23/2018
RIP: 0010:debug_print_object
Call Trace:
debug_object_assert_init
del_timer
try_to_grab_pending
cancel_delayed_work
resctrl_offline_cpu
cpuhp_invoke_callback
cpuhp_thread_fun
smpboot_thread_fn
kthread
ret_from_fork
Fixes: e33026831bdb ("x86/intel_rdt/mbm: Handle counter overflow")
Signed-off-by: Qian Cai <cai(a)lca.pw>
Signed-off-by: Borislav Petkov <bp(a)suse.de>
Acked-by: Reinette Chatre <reinette.chatre(a)intel.com>
Cc: Fenghua Yu <fenghua.yu(a)intel.com>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: john.stultz(a)linaro.org
Cc: sboyd(a)kernel.org
Cc: <stable(a)vger.kernel.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: tj(a)kernel.org
Cc: Tony Luck <tony.luck(a)intel.com>
Cc: Vikas Shivappa <vikas.shivappa(a)linux.intel.com>
Cc: x86-ml <x86(a)kernel.org>
Link: https://lkml.kernel.org/r/20191211033042.2188-1-cai@lca.pw
---
arch/x86/kernel/cpu/resctrl/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 03eb90d..89049b3 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -618,7 +618,7 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r)
if (static_branch_unlikely(&rdt_mon_enable_key))
rmdir_mondata_subdir_allrdtgrp(r, d->id);
list_del(&d->list);
- if (is_mbm_enabled())
+ if (r->mon_capable && is_mbm_enabled())
cancel_delayed_work(&d->mbm_over);
if (is_llc_occupancy_enabled() && has_busy_rmid(r, d)) {
/*
Sasha,
On Mon, Dec 30, 2019 at 12:56:03AM +0000, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: ce99091730c9 ("perf tools: Move strlcpy() from perf to tools/lib/string.c").
>
> The bot has tested the following trees: v5.4.6, v5.3.18, v4.19.91, v4.14.160, v4.9.207.
>
> v5.4.6: Build OK!
> v5.3.18: Build OK!
> v4.19.91: Failed to apply! Possible dependencies:
> 7bd330de43fd ("tools lib: Adopt skip_spaces() from the kernel sources")
>
> v4.14.160: Failed to apply! Possible dependencies:
> 7bd330de43fd ("tools lib: Adopt skip_spaces() from the kernel sources")
>
> v4.9.207: Failed to apply! Possible dependencies:
> 7bd330de43fd ("tools lib: Adopt skip_spaces() from the kernel sources")
> 96395cbbc7e9 ("tools lib string: Adopt prefixcmp() from perf and subcmd")
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
Yes, there is a trivial conflict when this patch is applied to stable trees.
Do you need any help in resolving it?
Thanks,
Augmented Power Delivery Objects (A)PDO_s are used by USB-C
PD power adapters to advertize the voltages and currents
they support. There can be up to 7 PDO_s but before PPS
(programmable power supply) there were seldom more than 4
or 5. Recently Samsung released an optional PPS 45 Watt power
adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+
tablet and charges it quicker than the adapter supplied at
purchase. The EP-TA485 causes an overzealous WARN_ON to soil
the log plus it miscalculates the number of bytes to read.
So this bug has been there for some time but goes
undetected for the majority of USB-C PD power adapters on
the market today that have 6 or less PDO_s. That may soon
change as more USB-C PD adapters with PPS come to market.
Tested on a EP-TA485 and an older Lenovo PN: SA10M13950
USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus
several other PD power adapters.
Signed-off-by: Douglas Gilbert <dgilbert(a)interlog.com>
---
drivers/usb/typec/tcpm/tcpci.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index c1f7073a56de..8b4ff9fff340 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -432,20 +432,30 @@ irqreturn_t tcpci_irq(struct tcpci *tcpci)
if (status & TCPC_ALERT_RX_STATUS) {
struct pd_message msg;
- unsigned int cnt;
+ unsigned int cnt, payload_cnt;
u16 header;
regmap_read(tcpci->regmap, TCPC_RX_BYTE_CNT, &cnt);
+ /*
+ * 'cnt' corresponds to READABLE_BYTE_COUNT in section 4.4.14
+ * of the TCPCI spec [Rev 2.0 Ver 1.0 October 2017] and is
+ * defined in table 4-36 as one greater than the number of
+ * bytes received. And that number includes the header. So:
+ */
+ if (cnt > 3)
+ payload_cnt = cnt - (1 + sizeof(msg.header));
+ else
+ payload_cnt = 0;
tcpci_read16(tcpci, TCPC_RX_HDR, &header);
msg.header = cpu_to_le16(header);
- if (WARN_ON(cnt > sizeof(msg.payload)))
- cnt = sizeof(msg.payload);
+ if (WARN_ON(payload_cnt > sizeof(msg.payload)))
+ payload_cnt = sizeof(msg.payload);
- if (cnt > 0)
+ if (payload_cnt > 0)
regmap_raw_read(tcpci->regmap, TCPC_RX_DATA,
- &msg.payload, cnt);
+ &msg.payload, payload_cnt);
/* Read complete, clear RX status alert bit */
tcpci_write16(tcpci, TCPC_ALERT, TCPC_ALERT_RX_STATUS);
--
2.24.1
On Thu, Dec 26, 2019 at 12:55 AM Sasha Levin <sashal(a)kernel.org> wrote:
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.4.5, v5.3.18, v4.19.90, v4.14.159, v4.9.206, v4.4.206.
>
> v5.4.5: Build OK!
> v5.3.18: Build OK!
> v4.19.90: Build OK!
> v4.14.159: Failed to apply! Possible dependencies:
> 6dd0394f5fcd ("media: v4l2-compat-ioctl32: better name userspace pointers")
> fef6cc6b3618 ("media: v4l2-compat-ioctl32: fix several __user annotations")
>
> v4.9.206: Failed to apply! Possible dependencies:
> 6dd0394f5fcd ("media: v4l2-compat-ioctl32: better name userspace pointers")
> a56bc171598c ("[media] v4l: compat: Prevent allocating excessive amounts of memory")
> ba7ed691dcce ("[media] v4l2-compat-ioctl32: VIDIOC_S_EDID should return all fields on error")
> fb9ffa6a7f7e ("[media] v4l: Add metadata buffer type and format")
> fef6cc6b3618 ("media: v4l2-compat-ioctl32: fix several __user annotations")
>
> v4.4.206: Failed to apply! Possible dependencies:
> 0579e6e3a326 ("doc-rst: linux_tv: remove whitespaces")
> 17defc282fe6 ("Documentation: add meta-documentation for Sphinx and kernel-doc")
> 22cba31bae9d ("Documentation/sphinx: add basic working Sphinx configuration and build")
> 234d549662a7 ("doc-rst: video: use reference for VIDIOC_ENUMINPUT")
> 5377d91f3e88 ("doc-rst: linux_tv DocBook to reST migration (docs-next)")
> 6dd0394f5fcd ("media: v4l2-compat-ioctl32: better name userspace pointers")
> 7347081e8a52 ("doc-rst: linux_tv: simplify references")
> 789818845202 ("doc-rst: audio: Fix some cross references")
> 94fff0dc5333 ("doc-rst: dmx_fcalls: improve man-like format")
> 9e00ffca8cc7 ("doc-rst: querycap: fix troubles on some references")
> af4a4d0db8ab ("doc-rst: linux_tv: Replace reference names to match ioctls")
> c2b66cafdf02 ("[media] v4l: doc: Remove row numbers from tables")
> e6702ee18e24 ("doc-rst: app-pri: Fix a bad reference")
> fb9ffa6a7f7e ("[media] v4l: Add metadata buffer type and format")
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
I think we need it to support users of musl on old kernels: musl is
adding conversion functions for emulating the new (time64) ioctl
commands on top of the old format, and without my patch, the
new commands do not necessarily return an error that musl can
catch.
I can provide a backport of my patch to v4.4 and v4.9 for this when
the patch has made it into mainline. Can you notify me again when
the time has come?
A related question that we should address is whether we want the v4l2
and alsa time64 ioctl patches backported as well, and to which kernels
(if any).
My feeling is that we don't want them those in v4.14 and earlier because
that is rather pointless with musl already having emulation in user space
and the rest of the kernel not being y2038 safe at all.
For v5.4 I'd say we do want them, and possibly all the other remaining
y2038 patches as well, I have a tree[1] that I try to keep up to date
with the versions that got posted and/or merged, as I know there is
demand for it. If you prefer not to have them in v5.4.y, I can keep them
here myself and make sure it's possible to my branch into that instead.
v4.19 is a bit borderline: if we decide to do the backports to v5.4 and
there is demand for v4.19.y, I could also try to pick the most important
patches from my tree and backport them to v4.19.0 (including a lot of
work that went into v5.1) and then look at that tree to see if it should
be part of the official v4.19.y or not.
Arnd
[1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=…
In order to avoid confusing the HW, we must never submit an empty ring
during lite-restore, that is we should always advance the RING_TAIL
before submitting to stay ahead of the RING_HEAD.
Normally this is prevented by keeping a couple of spare NOPs in the
request->wa_tail so that on resubmission we can advance the tail. This
relies on the request only being resubmitted once, which is the normal
condition as it is seen once for ELSP[1] and then later in ELSP[0]. On
preemption, the requests are unwound and the tail reset back to the
normal end point (as we know the request is incomplete and therefore its
RING_HEAD is even earlier).
However, if this w/a should fail we would try and resubmit the request
with the RING_TAIL already set to the location of this request's wa_tail
potentially causing a GPU hang. We can spot when we do try and
incorrectly resubmit without advancing the RING_TAIL and spare any
embarrassment by forcing the context restore.
In the case of preempt-to-busy, we leave the requests running on the HW
while we unwind. As the ring is still live, we cannot rewind our
rq->tail without forcing a reload so leave it set to rq->wa_tail and
only force a reload if we resubmit after a lite-restore. (Normally, the
forced reload will be a part of the preemption event.)
Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy")
Closes: https://gitlab.freedesktop.org/drm/intel/issues/673
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: stable(a)vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191209023215.3519970-1-chri…
(cherry picked from commit 82c69bf58650e644c61aa2bf5100b63a1070fd2f)
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 42 ++++++++++++++---------------
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 06a506c29463..6600b2e08fe3 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -471,12 +471,6 @@ lrc_descriptor(struct intel_context *ce, struct intel_engine_cs *engine)
return desc;
}
-static void unwind_wa_tail(struct i915_request *rq)
-{
- rq->tail = intel_ring_wrap(rq->ring, rq->wa_tail - WA_TAIL_BYTES);
- assert_ring_tail_valid(rq->ring, rq->tail);
-}
-
static struct i915_request *
__unwind_incomplete_requests(struct intel_engine_cs *engine)
{
@@ -495,7 +489,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
continue; /* XXX */
__i915_request_unsubmit(rq);
- unwind_wa_tail(rq);
/*
* Push the request back into the queue for later resubmission.
@@ -649,13 +642,29 @@ execlists_schedule_out(struct i915_request *rq)
i915_request_put(rq);
}
-static u64 execlists_update_context(const struct i915_request *rq)
+static u64 execlists_update_context(struct i915_request *rq)
{
struct intel_context *ce = rq->hw_context;
- u64 desc;
+ u64 desc = ce->lrc_desc;
+ u32 tail;
- ce->lrc_reg_state[CTX_RING_TAIL + 1] =
- intel_ring_set_tail(rq->ring, rq->tail);
+ /*
+ * WaIdleLiteRestore:bdw,skl
+ *
+ * We should never submit the context with the same RING_TAIL twice
+ * just in case we submit an empty ring, which confuses the HW.
+ *
+ * We append a couple of NOOPs (gen8_emit_wa_tail) after the end of
+ * the normal request to be able to always advance the RING_TAIL on
+ * subsequent resubmissions (for lite restore). Should that fail us,
+ * and we try and submit the same tail again, force the context
+ * reload.
+ */
+ tail = intel_ring_set_tail(rq->ring, rq->tail);
+ if (unlikely(ce->lrc_reg_state[CTX_RING_TAIL + 1] == tail))
+ desc |= CTX_DESC_FORCE_RESTORE;
+ ce->lrc_reg_state[CTX_RING_TAIL + 1] = tail;
+ rq->tail = rq->wa_tail;
/*
* Make sure the context image is complete before we submit it to HW.
@@ -674,7 +683,6 @@ static u64 execlists_update_context(const struct i915_request *rq)
*/
mb();
- desc = ce->lrc_desc;
ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE;
return desc;
@@ -1149,16 +1157,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
if (!list_is_last(&last->sched.link,
&engine->active.requests))
return;
-
- /*
- * WaIdleLiteRestore:bdw,skl
- * Apply the wa NOOPs to prevent
- * ring:HEAD == rq:TAIL as we resubmit the
- * request. See gen8_emit_fini_breadcrumb() for
- * where we prepare the padding after the
- * end of the request.
- */
- last->tail = last->wa_tail;
}
}
--
2.25.0.rc0
link_startup_again flow in ufshcd_link_startup() is not necessary
since currently device can be moved to "active" power mode during
resume flow by commit as below,
"scsi: ufs: set device as default active power mode during
initialization only"
Fixes: 7caf489b99a4 (scsi: ufs: issue link starup 2 times if device isn't active)
Cc: Alim Akhtar <alim.akhtar(a)samsung.com>
Cc: Avri Altman <avri.altman(a)wdc.com>
Cc: Bart Van Assche <bvanassche(a)acm.org>
Cc: Bean Huo <beanhuo(a)micron.com>
Cc: Can Guo <cang(a)codeaurora.org>
Cc: Matthias Brugger <matthias.bgg(a)gmail.com>
Cc: Subhash Jadavani <subhashj(a)codeaurora.org>
Cc: stable(a)vger.kernel.org
Signed-off-by: Stanley Chu <stanley.chu(a)mediatek.com>
---
drivers/scsi/ufs/ufshcd.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 9abb7085a5d0..1900f811394a 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4365,16 +4365,7 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
{
int ret;
int retries = DME_LINKSTARTUP_RETRIES;
- bool link_startup_again = false;
- /*
- * If UFS device isn't active then we will have to issue link startup
- * 2 times to make sure the device state move to active.
- */
- if (!ufshcd_is_ufs_dev_active(hba))
- link_startup_again = true;
-
-link_startup:
do {
ufshcd_vops_link_startup_notify(hba, PRE_CHANGE);
@@ -4408,12 +4399,6 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
goto out;
}
- if (link_startup_again) {
- link_startup_again = false;
- retries = DME_LINKSTARTUP_RETRIES;
- goto link_startup;
- }
-
/* Mark that link is up in PWM-G1, 1-lane, SLOW-AUTO mode */
ufshcd_init_pwr_info(hba);
ufshcd_print_pwr_info(hba);
--
2.18.0
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From d986294ee55d719562b20aabe15a39bf8f863415 Mon Sep 17 00:00:00 2001
From: Suwan Kim <suwan.kim027(a)gmail.com>
Date: Fri, 13 Dec 2019 11:30:54 +0900
Subject: [PATCH] usbip: Fix receive error in vhci-hcd when using
scatter-gather
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When vhci uses SG and receives data whose size is smaller than SG
buffer size, it tries to receive more data even if it acutally
receives all the data from the server. If then, it erroneously adds
error event and triggers connection shutdown.
vhci-hcd should check if it received all the data even if there are
more SG entries left. So, check if it receivces all the data from
the server in for_each_sg() loop.
Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub driver")
Reported-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Tested-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Signed-off-by: Suwan Kim <suwan.kim027(a)gmail.com>
Acked-by: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191213023055.19933-2-suwan.kim027@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
index 6532d68e8808..e4b96674c405 100644
--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -727,6 +727,9 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
copy -= recv;
ret += recv;
+
+ if (!copy)
+ break;
}
if (ret != size)
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 2c92dd20304f505b6ef43d206fff21bda8f1f0ae Mon Sep 17 00:00:00 2001
From: Faiz Abbas <faiz_abbas(a)ti.com>
Date: Fri, 6 Dec 2019 17:13:26 +0530
Subject: [PATCH] mmc: sdhci: Update the tuning failed messages to pr_debug
level
Tuning support in DDR50 speed mode was added in SD Specifications Part1
Physical Layer Specification v3.01. Its not possible to distinguish
between v3.00 and v3.01 from the SCR and that is why since
commit 4324f6de6d2e ("mmc: core: enable CMD19 tuning for DDR50 mode")
tuning failures are ignored in DDR50 speed mode.
Cards compatible with v3.00 don't respond to CMD19 in DDR50 and this
error gets printed during enumeration and also if retune is triggered at
any time during operation. Update the printk level to pr_debug so that
these errors don't lead to false error reports.
Signed-off-by: Faiz Abbas <faiz_abbas(a)ti.com>
Cc: stable(a)vger.kernel.org # v4.4+
Link: https://lore.kernel.org/r/20191206114326.15856-1-faiz_abbas@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson(a)linaro.org>
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 296d955ede59..42a9c8179da7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2417,8 +2417,8 @@ static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
sdhci_send_tuning(host, opcode);
if (!host->tuning_done) {
- pr_info("%s: Tuning timeout, falling back to fixed sampling clock\n",
- mmc_hostname(host->mmc));
+ pr_debug("%s: Tuning timeout, falling back to fixed sampling clock\n",
+ mmc_hostname(host->mmc));
sdhci_abort_tuning(host, opcode);
return -ETIMEDOUT;
}
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From a3a57ddad061acc90bef39635caf2b2330ce8f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <jschoenh(a)amazon.de>
Date: Tue, 10 Dec 2019 01:07:30 +0100
Subject: [PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The function mce_severity_amd_smca() requires m->bank to be initialized
for correct operation. Fix the one case, where mce_severity() is called
without doing so.
Fixes: 6bda529ec42e ("x86/mce: Grade uncorrected errors for SMCA-enabled systems")
Fixes: d28af26faa0b ("x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()")
Signed-off-by: Jan H. Schönherr <jschoenh(a)amazon.de>
Signed-off-by: Borislav Petkov <bp(a)suse.de>
Reviewed-by: Tony Luck <tony.luck(a)intel.com>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)kernel.org>
Cc: linux-edac <linux-edac(a)vger.kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: x86-ml <x86(a)kernel.org>
Cc: Yazen Ghannam <Yazen.Ghannam(a)amd.com>
Link: https://lkml.kernel.org/r/20191210000733.17979-4-jschoenh@amazon.de
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 5f42f25bac8f..2e2a421c8528 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -819,8 +819,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
if (quirk_no_way_out)
quirk_no_way_out(i, m, regs);
+ m->bank = i;
if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
- m->bank = i;
mce_read_aux(m, i);
*msg = tmp;
return 1;
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From a3a57ddad061acc90bef39635caf2b2330ce8f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <jschoenh(a)amazon.de>
Date: Tue, 10 Dec 2019 01:07:30 +0100
Subject: [PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The function mce_severity_amd_smca() requires m->bank to be initialized
for correct operation. Fix the one case, where mce_severity() is called
without doing so.
Fixes: 6bda529ec42e ("x86/mce: Grade uncorrected errors for SMCA-enabled systems")
Fixes: d28af26faa0b ("x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()")
Signed-off-by: Jan H. Schönherr <jschoenh(a)amazon.de>
Signed-off-by: Borislav Petkov <bp(a)suse.de>
Reviewed-by: Tony Luck <tony.luck(a)intel.com>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)kernel.org>
Cc: linux-edac <linux-edac(a)vger.kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: x86-ml <x86(a)kernel.org>
Cc: Yazen Ghannam <Yazen.Ghannam(a)amd.com>
Link: https://lkml.kernel.org/r/20191210000733.17979-4-jschoenh@amazon.de
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 5f42f25bac8f..2e2a421c8528 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -819,8 +819,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
if (quirk_no_way_out)
quirk_no_way_out(i, m, regs);
+ m->bank = i;
if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
- m->bank = i;
mce_read_aux(m, i);
*msg = tmp;
return 1;
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 396d2e878f92ec108e4293f1c77ea3bc90b414ff Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson(a)google.com>
Date: Fri, 13 Dec 2019 16:15:15 -0800
Subject: [PATCH] kvm: x86: Host feature SSBD doesn't imply guest feature
SPEC_CTRL_SSBD
The host reports support for the synthetic feature X86_FEATURE_SSBD
when any of the three following hardware features are set:
CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31]
CPUID.80000008H:EBX.AMD_SSBD[bit 24]
CPUID.80000008H:EBX.VIRT_SSBD[bit 25]
Either of the first two hardware features implies the existence of the
IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does
not. Therefore, CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] should only be
set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or
CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host.
Fixes: 0c54914d0c52a ("KVM: x86: use Intel speculation bugs and features as derived in generic x86 code")
Signed-off-by: Jim Mattson <jmattson(a)google.com>
Reviewed-by: Jacob Xu <jacobhxu(a)google.com>
Reviewed-by: Peter Shier <pshier(a)google.com>
Cc: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: stable(a)vger.kernel.org
Reported-by: Eric Biggers <ebiggers(a)kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c0aa07487eb8..dd18aa6fa317 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -402,7 +402,8 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
entry->edx |= F(SPEC_CTRL);
if (boot_cpu_has(X86_FEATURE_STIBP))
entry->edx |= F(INTEL_STIBP);
- if (boot_cpu_has(X86_FEATURE_SSBD))
+ if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
+ boot_cpu_has(X86_FEATURE_AMD_SSBD))
entry->edx |= F(SPEC_CTRL_SSBD);
/*
* We emulate ARCH_CAPABILITIES in software even
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 396d2e878f92ec108e4293f1c77ea3bc90b414ff Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson(a)google.com>
Date: Fri, 13 Dec 2019 16:15:15 -0800
Subject: [PATCH] kvm: x86: Host feature SSBD doesn't imply guest feature
SPEC_CTRL_SSBD
The host reports support for the synthetic feature X86_FEATURE_SSBD
when any of the three following hardware features are set:
CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31]
CPUID.80000008H:EBX.AMD_SSBD[bit 24]
CPUID.80000008H:EBX.VIRT_SSBD[bit 25]
Either of the first two hardware features implies the existence of the
IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does
not. Therefore, CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] should only be
set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or
CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host.
Fixes: 0c54914d0c52a ("KVM: x86: use Intel speculation bugs and features as derived in generic x86 code")
Signed-off-by: Jim Mattson <jmattson(a)google.com>
Reviewed-by: Jacob Xu <jacobhxu(a)google.com>
Reviewed-by: Peter Shier <pshier(a)google.com>
Cc: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: stable(a)vger.kernel.org
Reported-by: Eric Biggers <ebiggers(a)kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c0aa07487eb8..dd18aa6fa317 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -402,7 +402,8 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
entry->edx |= F(SPEC_CTRL);
if (boot_cpu_has(X86_FEATURE_STIBP))
entry->edx |= F(INTEL_STIBP);
- if (boot_cpu_has(X86_FEATURE_SSBD))
+ if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
+ boot_cpu_has(X86_FEATURE_AMD_SSBD))
entry->edx |= F(SPEC_CTRL_SSBD);
/*
* We emulate ARCH_CAPABILITIES in software even
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 396d2e878f92ec108e4293f1c77ea3bc90b414ff Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson(a)google.com>
Date: Fri, 13 Dec 2019 16:15:15 -0800
Subject: [PATCH] kvm: x86: Host feature SSBD doesn't imply guest feature
SPEC_CTRL_SSBD
The host reports support for the synthetic feature X86_FEATURE_SSBD
when any of the three following hardware features are set:
CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31]
CPUID.80000008H:EBX.AMD_SSBD[bit 24]
CPUID.80000008H:EBX.VIRT_SSBD[bit 25]
Either of the first two hardware features implies the existence of the
IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does
not. Therefore, CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] should only be
set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or
CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host.
Fixes: 0c54914d0c52a ("KVM: x86: use Intel speculation bugs and features as derived in generic x86 code")
Signed-off-by: Jim Mattson <jmattson(a)google.com>
Reviewed-by: Jacob Xu <jacobhxu(a)google.com>
Reviewed-by: Peter Shier <pshier(a)google.com>
Cc: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: stable(a)vger.kernel.org
Reported-by: Eric Biggers <ebiggers(a)kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c0aa07487eb8..dd18aa6fa317 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -402,7 +402,8 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
entry->edx |= F(SPEC_CTRL);
if (boot_cpu_has(X86_FEATURE_STIBP))
entry->edx |= F(INTEL_STIBP);
- if (boot_cpu_has(X86_FEATURE_SSBD))
+ if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
+ boot_cpu_has(X86_FEATURE_AMD_SSBD))
entry->edx |= F(SPEC_CTRL_SSBD);
/*
* We emulate ARCH_CAPABILITIES in software even
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 Mon Sep 17 00:00:00 2001
From: Yonghan Ye <yonghan.ye(a)unisoc.com>
Date: Wed, 4 Dec 2019 20:00:07 +0800
Subject: [PATCH] serial: sprd: Add clearing break interrupt operation
A break interrupt will be generated if the RX line was pulled low, which
means some abnomal behaviors occurred of the UART. In this case, we still
need to clear this break interrupt status, otherwise it will cause irq
storm to crash the whole system.
Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support")
Signed-off-by: Yonghan Ye <yonghan.ye(a)unisoc.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Baolin Wang <baolin.wang7(a)gmail.com>
Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.15754606…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 31df23502562..f60a59d9bf27 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
if (ims & SPRD_IMSR_TIMEOUT)
serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
+ if (ims & SPRD_IMSR_BREAK_DETECT)
+ serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT);
+
if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT |
SPRD_IMSR_TIMEOUT))
sprd_rx(port);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 Mon Sep 17 00:00:00 2001
From: Yonghan Ye <yonghan.ye(a)unisoc.com>
Date: Wed, 4 Dec 2019 20:00:07 +0800
Subject: [PATCH] serial: sprd: Add clearing break interrupt operation
A break interrupt will be generated if the RX line was pulled low, which
means some abnomal behaviors occurred of the UART. In this case, we still
need to clear this break interrupt status, otherwise it will cause irq
storm to crash the whole system.
Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support")
Signed-off-by: Yonghan Ye <yonghan.ye(a)unisoc.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Baolin Wang <baolin.wang7(a)gmail.com>
Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.15754606…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 31df23502562..f60a59d9bf27 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
if (ims & SPRD_IMSR_TIMEOUT)
serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
+ if (ims & SPRD_IMSR_BREAK_DETECT)
+ serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT);
+
if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT |
SPRD_IMSR_TIMEOUT))
sprd_rx(port);
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 Mon Sep 17 00:00:00 2001
From: Yonghan Ye <yonghan.ye(a)unisoc.com>
Date: Wed, 4 Dec 2019 20:00:07 +0800
Subject: [PATCH] serial: sprd: Add clearing break interrupt operation
A break interrupt will be generated if the RX line was pulled low, which
means some abnomal behaviors occurred of the UART. In this case, we still
need to clear this break interrupt status, otherwise it will cause irq
storm to crash the whole system.
Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support")
Signed-off-by: Yonghan Ye <yonghan.ye(a)unisoc.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Baolin Wang <baolin.wang7(a)gmail.com>
Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.15754606…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 31df23502562..f60a59d9bf27 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
if (ims & SPRD_IMSR_TIMEOUT)
serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
+ if (ims & SPRD_IMSR_BREAK_DETECT)
+ serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT);
+
if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT |
SPRD_IMSR_TIMEOUT))
sprd_rx(port);
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From cb47b9f8630ae3fa3f5fbd0c7003faba7abdf711 Mon Sep 17 00:00:00 2001
From: David Engraf <david.engraf(a)sysgo.com>
Date: Mon, 16 Dec 2019 09:54:03 +0100
Subject: [PATCH] tty/serial: atmel: fix out of range clock divider handling
Use MCK_DIV8 when the clock divider is > 65535. Unfortunately the mode
register was already written thus the clock selection is ignored.
Fix by doing the baud rate calulation before setting the mode.
Fixes: 5bf5635ac170 ("tty/serial: atmel: add fractional baud rate support")
Signed-off-by: David Engraf <david.engraf(a)sysgo.com>
Acked-by: Ludovic Desroches <ludovic.desroches(a)microchip.com>
Acked-by: Richard Genoud <richard.genoud(a)gmail.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191216085403.17050-1-david.engraf@sysgo.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index a8dc8af83f39..1ba9bc667e13 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2270,27 +2270,6 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
mode |= ATMEL_US_USMODE_NORMAL;
}
- /* set the mode, clock divisor, parity, stop bits and data size */
- atmel_uart_writel(port, ATMEL_US_MR, mode);
-
- /*
- * when switching the mode, set the RTS line state according to the
- * new mode, otherwise keep the former state
- */
- if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
- unsigned int rts_state;
-
- if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
- /* let the hardware control the RTS line */
- rts_state = ATMEL_US_RTSDIS;
- } else {
- /* force RTS line to low level */
- rts_state = ATMEL_US_RTSEN;
- }
-
- atmel_uart_writel(port, ATMEL_US_CR, rts_state);
- }
-
/*
* Set the baud rate:
* Fractional baudrate allows to setup output frequency more
@@ -2317,6 +2296,28 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
if (!(port->iso7816.flags & SER_ISO7816_ENABLED))
atmel_uart_writel(port, ATMEL_US_BRGR, quot);
+
+ /* set the mode, clock divisor, parity, stop bits and data size */
+ atmel_uart_writel(port, ATMEL_US_MR, mode);
+
+ /*
+ * when switching the mode, set the RTS line state according to the
+ * new mode, otherwise keep the former state
+ */
+ if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
+ unsigned int rts_state;
+
+ if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
+ /* let the hardware control the RTS line */
+ rts_state = ATMEL_US_RTSDIS;
+ } else {
+ /* force RTS line to low level */
+ rts_state = ATMEL_US_RTSEN;
+ }
+
+ atmel_uart_writel(port, ATMEL_US_CR, rts_state);
+ }
+
atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
atmel_port->tx_stopped = false;
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From cb47b9f8630ae3fa3f5fbd0c7003faba7abdf711 Mon Sep 17 00:00:00 2001
From: David Engraf <david.engraf(a)sysgo.com>
Date: Mon, 16 Dec 2019 09:54:03 +0100
Subject: [PATCH] tty/serial: atmel: fix out of range clock divider handling
Use MCK_DIV8 when the clock divider is > 65535. Unfortunately the mode
register was already written thus the clock selection is ignored.
Fix by doing the baud rate calulation before setting the mode.
Fixes: 5bf5635ac170 ("tty/serial: atmel: add fractional baud rate support")
Signed-off-by: David Engraf <david.engraf(a)sysgo.com>
Acked-by: Ludovic Desroches <ludovic.desroches(a)microchip.com>
Acked-by: Richard Genoud <richard.genoud(a)gmail.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191216085403.17050-1-david.engraf@sysgo.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index a8dc8af83f39..1ba9bc667e13 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2270,27 +2270,6 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
mode |= ATMEL_US_USMODE_NORMAL;
}
- /* set the mode, clock divisor, parity, stop bits and data size */
- atmel_uart_writel(port, ATMEL_US_MR, mode);
-
- /*
- * when switching the mode, set the RTS line state according to the
- * new mode, otherwise keep the former state
- */
- if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
- unsigned int rts_state;
-
- if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
- /* let the hardware control the RTS line */
- rts_state = ATMEL_US_RTSDIS;
- } else {
- /* force RTS line to low level */
- rts_state = ATMEL_US_RTSEN;
- }
-
- atmel_uart_writel(port, ATMEL_US_CR, rts_state);
- }
-
/*
* Set the baud rate:
* Fractional baudrate allows to setup output frequency more
@@ -2317,6 +2296,28 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
if (!(port->iso7816.flags & SER_ISO7816_ENABLED))
atmel_uart_writel(port, ATMEL_US_BRGR, quot);
+
+ /* set the mode, clock divisor, parity, stop bits and data size */
+ atmel_uart_writel(port, ATMEL_US_MR, mode);
+
+ /*
+ * when switching the mode, set the RTS line state according to the
+ * new mode, otherwise keep the former state
+ */
+ if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
+ unsigned int rts_state;
+
+ if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
+ /* let the hardware control the RTS line */
+ rts_state = ATMEL_US_RTSDIS;
+ } else {
+ /* force RTS line to low level */
+ rts_state = ATMEL_US_RTSEN;
+ }
+
+ atmel_uart_writel(port, ATMEL_US_CR, rts_state);
+ }
+
atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
atmel_port->tx_stopped = false;
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 85572c2c4a45a541e880e087b5b17a48198b2416 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki(a)intel.com>
Date: Wed, 11 Dec 2019 11:28:41 +0100
Subject: [PATCH] cpufreq: Avoid leaving stale IRQ work items during CPU
offline
The scheduler code calling cpufreq_update_util() may run during CPU
offline on the target CPU after the IRQ work lists have been flushed
for it, so the target CPU should be prevented from running code that
may queue up an IRQ work item on it at that point.
Unfortunately, that may not be the case if dvfs_possible_from_any_cpu
is set for at least one cpufreq policy in the system, because that
allows the CPU going offline to run the utilization update callback
of the cpufreq governor on behalf of another (online) CPU in some
cases.
If that happens, the cpufreq governor callback may queue up an IRQ
work on the CPU running it, which is going offline, and the IRQ work
may not be flushed after that point. Moreover, that IRQ work cannot
be flushed until the "offlining" CPU goes back online, so if any
other CPU calls irq_work_sync() to wait for the completion of that
IRQ work, it will have to wait until the "offlining" CPU is back
online and that may not happen forever. In particular, a system-wide
deadlock may occur during CPU online as a result of that.
The failing scenario is as follows. CPU0 is the boot CPU, so it
creates a cpufreq policy and becomes the "leader" of it
(policy->cpu). It cannot go offline, because it is the boot CPU.
Next, other CPUs join the cpufreq policy as they go online and they
leave it when they go offline. The last CPU to go offline, say CPU3,
may queue up an IRQ work while running the governor callback on
behalf of CPU0 after leaving the cpufreq policy because of the
dvfs_possible_from_any_cpu effect described above. Then, CPU0 is
the only online CPU in the system and the stale IRQ work is still
queued on CPU3. When, say, CPU1 goes back online, it will run
irq_work_sync() to wait for that IRQ work to complete and so it
will wait for CPU3 to go back online (which may never happen even
in principle), but (worse yet) CPU0 is waiting for CPU1 at that
point too and a system-wide deadlock occurs.
To address this problem notice that CPUs which cannot run cpufreq
utilization update code for themselves (for example, because they
have left the cpufreq policies that they belonged to), should also
be prevented from running that code on behalf of the other CPUs that
belong to a cpufreq policy with dvfs_possible_from_any_cpu set and so
in that case the cpufreq_update_util_data pointer of the CPU running
the code must not be NULL as well as for the CPU which is the target
of the cpufreq utilization update in progress.
Accordingly, change cpufreq_this_cpu_can_update() into a regular
function in kernel/sched/cpufreq.c (instead of a static inline in a
header file) and make it check the cpufreq_update_util_data pointer
of the local CPU if dvfs_possible_from_any_cpu is set for the target
cpufreq policy.
Also update the schedutil governor to do the
cpufreq_this_cpu_can_update() check in the non-fast-switch
case too to avoid the stale IRQ work issues.
Fixes: 99d14d0e16fa ("cpufreq: Process remote callbacks from any CPU if the platform permits")
Link: https://lore.kernel.org/linux-pm/20191121093557.bycvdo4xyinbc5cb@vireshk-i7/
Reported-by: Anson Huang <anson.huang(a)nxp.com>
Tested-by: Anson Huang <anson.huang(a)nxp.com>
Cc: 4.14+ <stable(a)vger.kernel.org> # 4.14+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
Acked-by: Viresh Kumar <viresh.kumar(a)linaro.org>
Tested-by: Peng Fan <peng.fan(a)nxp.com> (i.MX8QXP-MEK)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 92d5fdc8154e..31b1b0e03df8 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -595,17 +595,6 @@ struct governor_attr {
size_t count);
};
-static inline bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy)
-{
- /*
- * Allow remote callbacks if:
- * - dvfs_possible_from_any_cpu flag is set
- * - the local and remote CPUs share cpufreq policy
- */
- return policy->dvfs_possible_from_any_cpu ||
- cpumask_test_cpu(smp_processor_id(), policy->cpus);
-}
-
/*********************************************************************
* FREQUENCY TABLE HELPERS *
*********************************************************************/
diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h
index afa940cd50dc..cc6bcc1e96bc 100644
--- a/include/linux/sched/cpufreq.h
+++ b/include/linux/sched/cpufreq.h
@@ -12,6 +12,8 @@
#define SCHED_CPUFREQ_MIGRATION (1U << 1)
#ifdef CONFIG_CPU_FREQ
+struct cpufreq_policy;
+
struct update_util_data {
void (*func)(struct update_util_data *data, u64 time, unsigned int flags);
};
@@ -20,6 +22,7 @@ void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data,
void (*func)(struct update_util_data *data, u64 time,
unsigned int flags));
void cpufreq_remove_update_util_hook(int cpu);
+bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy);
static inline unsigned long map_util_freq(unsigned long util,
unsigned long freq, unsigned long cap)
diff --git a/kernel/sched/cpufreq.c b/kernel/sched/cpufreq.c
index b5dcd1d83c7f..7c2fe50fd76d 100644
--- a/kernel/sched/cpufreq.c
+++ b/kernel/sched/cpufreq.c
@@ -5,6 +5,8 @@
* Copyright (C) 2016, Intel Corporation
* Author: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
*/
+#include <linux/cpufreq.h>
+
#include "sched.h"
DEFINE_PER_CPU(struct update_util_data __rcu *, cpufreq_update_util_data);
@@ -57,3 +59,19 @@ void cpufreq_remove_update_util_hook(int cpu)
rcu_assign_pointer(per_cpu(cpufreq_update_util_data, cpu), NULL);
}
EXPORT_SYMBOL_GPL(cpufreq_remove_update_util_hook);
+
+/**
+ * cpufreq_this_cpu_can_update - Check if cpufreq policy can be updated.
+ * @policy: cpufreq policy to check.
+ *
+ * Return 'true' if:
+ * - the local and remote CPUs share @policy,
+ * - dvfs_possible_from_any_cpu is set in @policy and the local CPU is not going
+ * offline (in which case it is not expected to run cpufreq updates any more).
+ */
+bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy)
+{
+ return cpumask_test_cpu(smp_processor_id(), policy->cpus) ||
+ (policy->dvfs_possible_from_any_cpu &&
+ rcu_dereference_sched(*this_cpu_ptr(&cpufreq_update_util_data)));
+}
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 322ca8860f54..9b8916fd00a2 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -82,12 +82,10 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
* by the hardware, as calculating the frequency is pointless if
* we cannot in fact act on it.
*
- * For the slow switching platforms, the kthread is always scheduled on
- * the right set of CPUs and any CPU can find the next frequency and
- * schedule the kthread.
+ * This is needed on the slow switching platforms too to prevent CPUs
+ * going offline from leaving stale IRQ work items behind.
*/
- if (sg_policy->policy->fast_switch_enabled &&
- !cpufreq_this_cpu_can_update(sg_policy->policy))
+ if (!cpufreq_this_cpu_can_update(sg_policy->policy))
return false;
if (unlikely(sg_policy->limits_changed)) {
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From d986294ee55d719562b20aabe15a39bf8f863415 Mon Sep 17 00:00:00 2001
From: Suwan Kim <suwan.kim027(a)gmail.com>
Date: Fri, 13 Dec 2019 11:30:54 +0900
Subject: [PATCH] usbip: Fix receive error in vhci-hcd when using
scatter-gather
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When vhci uses SG and receives data whose size is smaller than SG
buffer size, it tries to receive more data even if it acutally
receives all the data from the server. If then, it erroneously adds
error event and triggers connection shutdown.
vhci-hcd should check if it received all the data even if there are
more SG entries left. So, check if it receivces all the data from
the server in for_each_sg() loop.
Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub driver")
Reported-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Tested-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Signed-off-by: Suwan Kim <suwan.kim027(a)gmail.com>
Acked-by: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191213023055.19933-2-suwan.kim027@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
index 6532d68e8808..e4b96674c405 100644
--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -727,6 +727,9 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
copy -= recv;
ret += recv;
+
+ if (!copy)
+ break;
}
if (ret != size)
Isn't autosel stuff being buildtested before it ends up in stable queue ?
I tried to build the current stuff and end up with:
**********
libbpf.c: In function 'bpf_program__collect_reloc':
libbpf.c:1795:5: error: implicit declaration of function 'pr_warn'; did
you mean 'pr_warning'? [-Werror=implicit-function-declaration]
1795 | pr_warn("bad call relo offset: %lu\n", sym.st_value);
| ^~~~~~~
| pr_warning
libbpf.c:1795:5: error: nested extern declaration of 'pr_warn'
[-Werror=nested-externs]
Caused by:
libbpf-fix-call-relocation-offset-calculation-bug.patch
**********
builtin-trace.c: In function 'trace__record':
builtin-trace.c:2580:17: warning: implicit declaration of function
'asprintf__tp_filter_pids' [-Wimplicit-function-declaration]
2580 | char *filter = asprintf__tp_filter_pids(1, &pid);
| ^~~~~~~~~~~~~~~~~~~~~~~~
builtin-trace.c:2580:17: warning: nested extern declaration of
'asprintf__tp_filter_pids' [-Wnested-externs]
builtin-trace.c:2580:17: warning: initialization of 'char *' from 'int'
makes pointer from integer without a cast [-Wint-conversion]
Caused by:
perf-trace-filter-own-pid-to-avoid-a-feedback-look-i.patch
**********
arch/x86/util/auxtrace.c: In function 'auxtrace_record__init_intel':
arch/x86/util/auxtrace.c:31:16: error: 'struct perf_pmu' has no member
named 'auxtrace'
31 | intel_bts_pmu->auxtrace = true;
| ^~
mv: cannot stat 'arch/x86/util/.auxtrace.o.tmp': No such file or directory
make[6]: *** [/linux-5.4/tools/build/Makefile.build:97:
arch/x86/util/auxtrace.o] Error 1
make[6]: *** Waiting for unfinished jobs....
arch/x86/util/intel-bts.c: In function 'intel_bts_recording_options':
arch/x86/util/intel-bts.c:116:12: error: 'struct record_opts' has no
member named 'auxtrace_sample_mode'; did you mean 'auxtrace_snapshot_mode'?
116 | if (opts->auxtrace_sample_mode) {
| ^~~~~~~~~~~~~~~~~~~~
| auxtrace_snapshot_mode
Caused by:
perf-intel-bts-does-not-support-aux-area-sampling.patch
**********
util/record.c: In function 'perf_can_aux_sample':
util/record.c:152:4: error: 'struct perf_event_attr' has no member named
'aux_sample_size'
152 | .aux_sample_size = 1,
| ^~~~~~~~~~~~~~~
Caused by:
perf-record-add-a-function-to-test-for-kernel-suppor.patch
**********
util/parse-events.c: In function 'tracepoint_error':
util/parse-events.c:508:2: warning: implicit declaration of function
'parse_events__handle_error'; did you mean 'parse_events_print_error'?
[-Wimplicit-function-declaration]
508 | parse_events__handle_error(e, 0, strdup(str), strdup(help));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| parse_events_print_error
util/parse-events.c:508:2: warning: nested extern declaration of
'parse_events__handle_error' [-Wnested-externs]
Caused by:
perf-parse-fix-potential-memory-leak-when-handling-t.patch
**********
/usr/bin/ld: perf-in.o: in function `debuginfo__find_probe_point':
/linux-5.4/tools/perf/util/probe-finder.c:1616: undefined reference to `
die_entrypc'
/usr/bin/ld: /linux-5.4/tools/perf/util/probe-finder.c:1633: undefined
reference to `die_entrypc'
/usr/bin/ld: perf-in.o: in function `probe_point_search_cb':
/linux-5.4/tools/perf/util/probe-finder.c:1012: undefined reference to
`die_entrypc'
/usr/bin/ld: perf-in.o: in function `probe_point_inline_cb':
/linux-5.4/tools/perf/util/probe-finder.c:960: undefined reference to
`die_entrypc'
/usr/bin/ld: perf-in.o: in function `__die_walk_funclines_cb':
/linux-5.4/tools/perf/util/dwarf-aux.c:683: undefined reference to
`die_entrypc'
/usr/bin/ld: perf-in.o:/linux-5.4/tools/perf/util/dwarf-aux.c:683: more
undefined references to `die_entrypc' follow
Caused by:
perf-probe-fix-to-probe-a-function-which-has-no-entr.patch
perf-probe-fix-to-show-inlined-function-callsite-wit.patch
perf-probe-fix-to-list-probe-event-with-correct-line.patch
perf-probe-fix-to-probe-an-inline-function-which-has.patch
perf-probe-fix-to-show-ranges-of-variables-in-functi.patch
--
Thomas
memory.{emin, elow} are set in mem_cgroup_protected(), and the values of
them won't be changed until next recalculation in this function. After
either or both of them are set, the next reclaimer to relcaim this memcg
may be a different reclaimer, e.g. this memcg is also the root memcg of
the new reclaimer, and then in mem_cgroup_protection() in get_scan_count()
the old values of them will be used to calculate scan count, that is not
proper. We should reset them to zero in this case.
Here's an example of this issue.
root_mem_cgroup
/
A memory.max=1024M memory.min=512M memory.current=800M
Once kswapd is waked up, it will try to scan all MEMCGs, including
this A, and it will assign memory.emin of A with 512M.
After that, A may reach its hard limit(memory.max), and then it will
do memcg reclaim. Because A is the root of this reclaimer, so it will
not calculate its memory.emin. So the memory.emin is the old value
512M, and then this old value will be used in
mem_cgroup_protection() in get_scan_count() to get the scan count.
That is not proper.
Fixes: 9783aa9917f8 ("mm, memcg: proportional memory.{low,min} reclaim")
Signed-off-by: Yafang Shao <laoar.shao(a)gmail.com>
Cc: Chris Down <chris(a)chrisdown.name>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: stable(a)vger.kernel.org
---
mm/memcontrol.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 601405b..bb3925d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6287,8 +6287,17 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root,
if (!root)
root = root_mem_cgroup;
- if (memcg == root)
+ if (memcg == root) {
+ /*
+ * Reset memory.(emin, elow) for reclaiming the memcg
+ * itself.
+ */
+ if (memcg != root_mem_cgroup) {
+ memcg->memory.emin = 0;
+ memcg->memory.elow = 0;
+ }
return MEMCG_PROT_NONE;
+ }
usage = page_counter_read(&memcg->memory);
if (!usage)
--
1.8.3.1
From: Ganapathi Bhat <gbhat(a)marvell.com>
[ Upstream commit 3d94a4a8373bf5f45cf5f939e88b8354dbf2311b ]
mwifiex_process_country_ie() function parse elements of bss
descriptor in beacon packet. When processing WLAN_EID_COUNTRY
element, there is no upper limit check for country_ie_len before
calling memcpy. The destination buffer domain_info->triplet is an
array of length MWIFIEX_MAX_TRIPLET_802_11D(83). The remote
attacker can build a fake AP with the same ssid as real AP, and
send malicous beacon packet with long WLAN_EID_COUNTRY elemen
(country_ie_len > 83). Attacker can force STA connect to fake AP
on a different channel. When the victim STA connects to fake AP,
will trigger the heap buffer overflow. Fix this by checking for
length and if found invalid, don not connect to the AP.
This fix addresses CVE-2019-14895.
Reported-by: huangwen <huangwenabc(a)gmail.com>
Signed-off-by: Ganapathi Bhat <gbhat(a)marvell.com>
Signed-off-by: Kalle Valo <kvalo(a)codeaurora.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index 478885afb6c6..be3be7a63cf0 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -271,6 +271,14 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv,
"11D: skip setting domain info in FW\n");
return 0;
}
+
+ if (country_ie_len >
+ (IEEE80211_COUNTRY_STRING_LEN + MWIFIEX_MAX_TRIPLET_802_11D)) {
+ mwifiex_dbg(priv->adapter, ERROR,
+ "11D: country_ie_len overflow!, deauth AP\n");
+ return -EINVAL;
+ }
+
memcpy(priv->adapter->country_code, &country_ie[2], 2);
domain_info->country_code[0] = country_ie[2];
@@ -314,8 +322,9 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
priv->scan_block = false;
if (bss) {
- if (adapter->region_code == 0x00)
- mwifiex_process_country_ie(priv, bss);
+ if (adapter->region_code == 0x00 &&
+ mwifiex_process_country_ie(priv, bss))
+ return -EINVAL;
/* Allocate and fill new bss descriptor */
bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor),
--
2.20.1
From: Ganapathi Bhat <gbhat(a)marvell.com>
[ Upstream commit 3d94a4a8373bf5f45cf5f939e88b8354dbf2311b ]
mwifiex_process_country_ie() function parse elements of bss
descriptor in beacon packet. When processing WLAN_EID_COUNTRY
element, there is no upper limit check for country_ie_len before
calling memcpy. The destination buffer domain_info->triplet is an
array of length MWIFIEX_MAX_TRIPLET_802_11D(83). The remote
attacker can build a fake AP with the same ssid as real AP, and
send malicous beacon packet with long WLAN_EID_COUNTRY elemen
(country_ie_len > 83). Attacker can force STA connect to fake AP
on a different channel. When the victim STA connects to fake AP,
will trigger the heap buffer overflow. Fix this by checking for
length and if found invalid, don not connect to the AP.
This fix addresses CVE-2019-14895.
Reported-by: huangwen <huangwenabc(a)gmail.com>
Signed-off-by: Ganapathi Bhat <gbhat(a)marvell.com>
Signed-off-by: Kalle Valo <kvalo(a)codeaurora.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index a8043d76152a..f88a953b3cd5 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -271,6 +271,14 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv,
"11D: skip setting domain info in FW\n");
return 0;
}
+
+ if (country_ie_len >
+ (IEEE80211_COUNTRY_STRING_LEN + MWIFIEX_MAX_TRIPLET_802_11D)) {
+ mwifiex_dbg(priv->adapter, ERROR,
+ "11D: country_ie_len overflow!, deauth AP\n");
+ return -EINVAL;
+ }
+
memcpy(priv->adapter->country_code, &country_ie[2], 2);
domain_info->country_code[0] = country_ie[2];
@@ -314,8 +322,9 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
priv->scan_block = false;
if (bss) {
- if (adapter->region_code == 0x00)
- mwifiex_process_country_ie(priv, bss);
+ if (adapter->region_code == 0x00 &&
+ mwifiex_process_country_ie(priv, bss))
+ return -EINVAL;
/* Allocate and fill new bss descriptor */
bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor),
--
2.20.1
Confusingly, there are three SPSR layouts that a kernel may need to deal
with:
(1) An AArch64 SPSR_ELx view of an AArch64 pstate
(2) An AArch64 SPSR_ELx view of an AArch32 pstate
(3) An AArch32 SPSR_* view of an AArch32 pstate
When the KVM AArch32 support code deals with SPSR_{EL2,HYP}, it's either
dealing with #2 or #3 consistently. On arm64 the PSR_AA32_* definitions
match the AArch64 SPSR_ELx view, and on arm the PSR_AA32_* definitions
match the AArch32 SPSR_* view.
However, when we inject an exception into an AArch32 guest, we have to
synthesize the AArch32 SPSR_* that the guest will see. Thus, an AArch64
host needs to synthesize layout #3 from layout #2.
This patch adds a new host_spsr_to_spsr32() helper for this, and makes
use of it in the KVM AArch32 support code. For arm64 we need to shuffle
the DIT bit around, and remove the SS bit, while for arm we can use the
value as-is.
I've open-coded the bit manipulation for now to avoid having to rework
the existing PSR_* definitions into PSR64_AA32_* and PSR32_AA32_*
definitions. I hope to perform a more thorough refactoring in future so
that we can handle pstate view manipulation more consistently across the
kernel tree.
Signed-off-by: Mark Rutland <mark.rutland(a)arm.com>
Cc: Alexandru Elisei <alexandru.elisei(a)arm.com>
Cc: Drew Jones <drjones(a)redhat.com>
Cc: James Morse <james.morse(a)arm.com>
Cc: Julien Thierry <julien.thierry.kdev(a)gmail.com>
Cc: Marc Zyngier <maz(a)kernel.org>
Cc: Peter Maydell <peter.maydell(a)linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose(a)arm.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: stable(a)vger.kernel.org
---
arch/arm/include/asm/kvm_emulate.h | 5 +++++
arch/arm64/include/asm/kvm_emulate.h | 32 ++++++++++++++++++++++++++++++++
virt/kvm/arm/aarch32.c | 6 +++---
3 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
index dee2567661ed..b811576bc456 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -53,6 +53,11 @@ static inline void vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long v)
*__vcpu_spsr(vcpu) = v;
}
+static inline unsigned long host_spsr_to_spsr32(unsigned long spsr)
+{
+ return spsr;
+}
+
static inline unsigned long vcpu_get_reg(struct kvm_vcpu *vcpu,
u8 reg_num)
{
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
index d69c1efc63e7..98672938f9f9 100644
--- a/arch/arm64/include/asm/kvm_emulate.h
+++ b/arch/arm64/include/asm/kvm_emulate.h
@@ -204,6 +204,38 @@ static inline void vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long v)
vcpu_gp_regs(vcpu)->spsr[KVM_SPSR_EL1] = v;
}
+/*
+ * The layout of SPSR for an AArch32 state is different when observed from an
+ * AArch64 SPSR_ELx or an AArch32 SPSR_*. This function generates the AArch32
+ * view given an AArch64 view.
+ *
+ * In ARM DDI 0487E.a see:
+ *
+ * - The AArch64 view (SPSR_EL2) in section C5.2.18, page C5-426
+ * - The AArch32 view (SPSR_abt) in section G8.2.126, page G8-6256
+ * - The AArch32 view (SPSR_und) in section G8.2.132, page G8-6280
+ *
+ * Which show the following differences:
+ *
+ * | Bit | AA64 | AA32 | Notes |
+ * +-----+------+------+-----------------------------|
+ * | 24 | DIT | J | J is RES0 in ARMv8 |
+ * | 21 | SS | DIT | SS doesn't exist in AArch32 |
+ *
+ * ... and all other bits are (currently) common.
+ */
+static inline unsigned long host_spsr_to_spsr32(unsigned long spsr)
+{
+ const unsigned long overlap = BIT(24) | BIT(21);
+ unsigned long dit = !!(spsr & PSR_AA32_DIT_BIT);
+
+ spsr &= overlap;
+
+ spsr |= dit << 21;
+
+ return spsr;
+}
+
static inline bool vcpu_mode_priv(const struct kvm_vcpu *vcpu)
{
u32 mode;
diff --git a/virt/kvm/arm/aarch32.c b/virt/kvm/arm/aarch32.c
index 17bcde5c2451..115210e64682 100644
--- a/virt/kvm/arm/aarch32.c
+++ b/virt/kvm/arm/aarch32.c
@@ -128,15 +128,15 @@ static unsigned long get_except32_cpsr(struct kvm_vcpu *vcpu, u32 mode)
static void prepare_fault32(struct kvm_vcpu *vcpu, u32 mode, u32 vect_offset)
{
- unsigned long new_spsr_value = *vcpu_cpsr(vcpu);
- bool is_thumb = (new_spsr_value & PSR_AA32_T_BIT);
+ unsigned long spsr = *vcpu_cpsr(vcpu);
+ bool is_thumb = (spsr & PSR_AA32_T_BIT);
u32 return_offset = return_offsets[vect_offset >> 2][is_thumb];
u32 sctlr = vcpu_cp15(vcpu, c1_SCTLR);
*vcpu_cpsr(vcpu) = get_except32_cpsr(vcpu, mode);
/* Note: These now point to the banked copies */
- vcpu_write_spsr(vcpu, new_spsr_value);
+ vcpu_write_spsr(vcpu, host_spsr_to_spsr32(spsr));
*vcpu_reg32(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
/* Branch to exception vector */
--
2.11.0
From: Stefan Berger <stefanb(a)linux.ibm.com>
Revert the patch that was setting the TPM_CHIP_FLAG_IRQ before probing for
interrupts.
Cc: Jerry Snitselaar <jsnitsel(a)redhat.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Fixes: 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts")
Signed-off-by: Stefan Berger <stefanb(a)linux.ibm.com>
Reported-by: Jerry Snitselaar <jsnitsel(a)redhat.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
---
Please check and inform if also 2/2 of Stefan's patches is needed. I'll
prepare the PR accordingly. Thanks.
drivers/char/tpm/tpm_tis_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index bb0343ffd235..7ee29e25cb3b 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -1059,7 +1059,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
goto err_probe;
}
- chip->flags |= TPM_CHIP_FLAG_IRQ;
if (irq) {
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
irq);
--
2.20.1
Hi,
On 26-12-2019 00:55, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.4.5, v5.3.18, v4.19.90, v4.14.159, v4.9.206, v4.4.206.
>
> v5.4.5: Build OK!
> v5.3.18: Build OK!
> v4.19.90: Build OK!
> v4.14.159: Build OK!
> v4.9.206: Failed to apply! Possible dependencies:
> 1f59ab2783ae ("ACPI / video: Add force_none quirk for Dell OptiPlex 9020M")
> d37efb79bc1c ("ACPI / video: Add quirks for the Dell Precision 7510")
>
> v4.4.206: Failed to apply! Possible dependencies:
> 1f59ab2783ae ("ACPI / video: Add force_none quirk for Dell OptiPlex 9020M")
> d37efb79bc1c ("ACPI / video: Add quirks for the Dell Precision 7510")
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
This fix is mostly cosmetical (it hides a non working brightness control
in various desktop environments) so just backporting this to the kernels
where it cleanly applies is fine.
Regards,
Hans
We can only check for IN direction if the request had completed. For OUT
direction, it's perfectly fine that the host can send less than the
setup length. Let's return true fall all cases of OUT direction.
Fixes: e0c42ce590fe ("usb: dwc3: gadget: simplify IOC handling")
Cc: stable(a)vger.kernel.org
Signed-off-by: Thinh Nguyen <thinhn(a)synopsys.com>
---
drivers/usb/dwc3/gadget.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index b3f8514d1f27..edc478c20846 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2470,6 +2470,13 @@ static int dwc3_gadget_ep_reclaim_trb_linear(struct dwc3_ep *dep,
static bool dwc3_gadget_ep_request_completed(struct dwc3_request *req)
{
+ /*
+ * For OUT direction, host may send less than the setup
+ * length. Return true for all OUT requests.
+ */
+ if (!req->direction)
+ return true;
+
return req->request.actual == req->request.length;
}
--
2.11.0
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 4911ee401b7ceff8f38e0ac597cbf503d71e690c
Gitweb: https://git.kernel.org/tip/4911ee401b7ceff8f38e0ac597cbf503d71e690c
Author: Ard Biesheuvel <ardb(a)kernel.org>
AuthorDate: Tue, 24 Dec 2019 14:29:09 +01:00
Committer: Ingo Molnar <mingo(a)kernel.org>
CommitterDate: Wed, 25 Dec 2019 10:46:07 +01:00
x86/efistub: Disable paging at mixed mode entry
The EFI mixed mode entry code goes through the ordinary startup_32()
routine before jumping into the kernel's EFI boot code in 64-bit
mode. The 32-bit startup code must be entered with paging disabled,
but this is not documented as a requirement for the EFI handover
protocol, and so we should disable paging explicitly when entering
the kernel from 32-bit EFI firmware.
Signed-off-by: Ard Biesheuvel <ardb(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: Arvind Sankar <nivedita(a)alum.mit.edu>
Cc: Hans de Goede <hdegoede(a)redhat.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: linux-efi(a)vger.kernel.org
Link: https://lkml.kernel.org/r/20191224132909.102540-4-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
---
arch/x86/boot/compressed/head_64.S | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 58a512e..ee60b81 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -244,6 +244,11 @@ SYM_FUNC_START(efi32_stub_entry)
leal efi32_config(%ebp), %eax
movl %eax, efi_config(%ebp)
+ /* Disable paging */
+ movl %cr0, %eax
+ btrl $X86_CR0_PG_BIT, %eax
+ movl %eax, %cr0
+
jmp startup_32
SYM_FUNC_END(efi32_stub_entry)
#endif
The patch titled
Subject: mm, debug_pagealloc: don't rely on static keys too early
has been added to the -mm tree. Its filename is
mm-debug_pagealloc-dont-rely-on-static-keys-too-early.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-debug_pagealloc-dont-rely-on-st…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-debug_pagealloc-dont-rely-on-st…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Vlastimil Babka <vbabka(a)suse.cz>
Subject: mm, debug_pagealloc: don't rely on static keys too early
Commit 96a2b03f281d ("mm, debug_pagelloc: use static keys to enable
debugging") has introduced a static key to reduce overhead when
debug_pagealloc is compiled in but not enabled. It relied on the
assumption that jump_label_init() is called before parse_early_param() as
in start_kernel(), so when the "debug_pagealloc=on" option is parsed, it
is safe to enable the static key.
However, it turns out multiple architectures call parse_early_param()
earlier from their setup_arch(). x86 also calls jump_label_init() even
earlier, so no issue was found while testing the commit, but same is not
true for e.g. ppc64 and s390 where the kernel would not boot with
debug_pagealloc=on as found by our QA.
To fix this without tricky changes to init code of multiple architectures,
this patch partially reverts the static key conversion from 96a2b03f281d.
Init-time and non-fastpath calls (such as in arch code) of
debug_pagealloc_enabled() will again test a simple bool variable.
Fastpath mm code is converted to a new debug_pagealloc_enabled_static()
variant that relies on the static key, which is enabled in a well-defined
point in mm_init() where it's guaranteed that jump_label_init() has been
called, regardless of architecture.
Link: http://lkml.kernel.org/r/20191219130612.23171-1-vbabka@suse.cz
Fixes: 96a2b03f281d ("mm, debug_pagelloc: use static keys to enable debugging")
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Mel Gorman <mgorman(a)techsingularity.net>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Qian Cai <cai(a)lca.pw>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 18 +++++++++++++++---
init/main.c | 1 +
mm/page_alloc.c | 36 ++++++++++++------------------------
mm/slab.c | 4 ++--
mm/slub.c | 2 +-
mm/vmalloc.c | 4 ++--
6 files changed, 33 insertions(+), 32 deletions(-)
--- a/include/linux/mm.h~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/include/linux/mm.h
@@ -2652,14 +2652,26 @@ static inline bool want_init_on_free(voi
!page_poisoning_enabled();
}
-#ifdef CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT
-DECLARE_STATIC_KEY_TRUE(_debug_pagealloc_enabled);
+#ifdef CONFIG_DEBUG_PAGEALLOC
+extern void init_debug_pagealloc(void);
#else
-DECLARE_STATIC_KEY_FALSE(_debug_pagealloc_enabled);
+static inline void init_debug_pagealloc(void) {}
#endif
+extern bool _debug_pagealloc_enabled_early;
+DECLARE_STATIC_KEY_FALSE(_debug_pagealloc_enabled);
static inline bool debug_pagealloc_enabled(void)
{
+ return IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) &&
+ _debug_pagealloc_enabled_early;
+}
+
+/*
+ * For use in fast paths after init_debug_pagealloc() has run, or when a
+ * false negative result is not harmful when called too early.
+ */
+static inline bool debug_pagealloc_enabled_static(void)
+{
if (!IS_ENABLED(CONFIG_DEBUG_PAGEALLOC))
return false;
--- a/init/main.c~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/init/main.c
@@ -554,6 +554,7 @@ static void __init mm_init(void)
* bigger than MAX_ORDER unless SPARSEMEM.
*/
page_ext_init_flatmem();
+ init_debug_pagealloc();
report_meminit();
mem_init();
kmem_cache_init();
--- a/mm/page_alloc.c~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/mm/page_alloc.c
@@ -694,34 +694,26 @@ void prep_compound_page(struct page *pag
#ifdef CONFIG_DEBUG_PAGEALLOC
unsigned int _debug_guardpage_minorder;
-#ifdef CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT
-DEFINE_STATIC_KEY_TRUE(_debug_pagealloc_enabled);
-#else
+bool _debug_pagealloc_enabled_early __read_mostly
+ = IS_ENABLED(CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT);
DEFINE_STATIC_KEY_FALSE(_debug_pagealloc_enabled);
-#endif
EXPORT_SYMBOL(_debug_pagealloc_enabled);
DEFINE_STATIC_KEY_FALSE(_debug_guardpage_enabled);
static int __init early_debug_pagealloc(char *buf)
{
- bool enable = false;
-
- if (kstrtobool(buf, &enable))
- return -EINVAL;
-
- if (enable)
- static_branch_enable(&_debug_pagealloc_enabled);
-
- return 0;
+ return kstrtobool(buf, &_debug_pagealloc_enabled_early);
}
early_param("debug_pagealloc", early_debug_pagealloc);
-static void init_debug_guardpage(void)
+void init_debug_pagealloc(void)
{
if (!debug_pagealloc_enabled())
return;
+ static_branch_enable(&_debug_pagealloc_enabled);
+
if (!debug_guardpage_minorder())
return;
@@ -1186,7 +1178,7 @@ static __always_inline bool free_pages_p
*/
arch_free_page(page, order);
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
kernel_map_pages(page, 1 << order, 0);
kasan_free_nondeferred_pages(page, order);
@@ -1207,7 +1199,7 @@ static bool free_pcp_prepare(struct page
static bool bulkfree_pcp_prepare(struct page *page)
{
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
return free_pages_check(page);
else
return false;
@@ -1221,7 +1213,7 @@ static bool bulkfree_pcp_prepare(struct
*/
static bool free_pcp_prepare(struct page *page)
{
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
return free_pages_prepare(page, 0, true);
else
return free_pages_prepare(page, 0, false);
@@ -1973,10 +1965,6 @@ void __init page_alloc_init_late(void)
for_each_populated_zone(zone)
set_zone_contiguous(zone);
-
-#ifdef CONFIG_DEBUG_PAGEALLOC
- init_debug_guardpage();
-#endif
}
#ifdef CONFIG_CMA
@@ -2106,7 +2094,7 @@ static inline bool free_pages_prezeroed(
*/
static inline bool check_pcp_refill(struct page *page)
{
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
return check_new_page(page);
else
return false;
@@ -2128,7 +2116,7 @@ static inline bool check_pcp_refill(stru
}
static inline bool check_new_pcp(struct page *page)
{
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
return check_new_page(page);
else
return false;
@@ -2155,7 +2143,7 @@ inline void post_alloc_hook(struct page
set_page_refcounted(page);
arch_alloc_page(page, order);
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
kernel_map_pages(page, 1 << order, 1);
kasan_alloc_pages(page, order);
kernel_poison_pages(page, 1 << order, 1);
--- a/mm/slab.c~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/mm/slab.c
@@ -1416,7 +1416,7 @@ static void kmem_rcu_free(struct rcu_hea
#if DEBUG
static bool is_debug_pagealloc_cache(struct kmem_cache *cachep)
{
- if (debug_pagealloc_enabled() && OFF_SLAB(cachep) &&
+ if (debug_pagealloc_enabled_static() && OFF_SLAB(cachep) &&
(cachep->size % PAGE_SIZE) == 0)
return true;
@@ -2008,7 +2008,7 @@ int __kmem_cache_create(struct kmem_cach
* to check size >= 256. It guarantees that all necessary small
* sized slab is initialized in current slab initialization sequence.
*/
- if (debug_pagealloc_enabled() && (flags & SLAB_POISON) &&
+ if (debug_pagealloc_enabled_static() && (flags & SLAB_POISON) &&
size >= 256 && cachep->object_size > cache_line_size()) {
if (size < PAGE_SIZE || size % PAGE_SIZE == 0) {
size_t tmp_size = ALIGN(size, PAGE_SIZE);
--- a/mm/slub.c~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/mm/slub.c
@@ -288,7 +288,7 @@ static inline void *get_freepointer_safe
unsigned long freepointer_addr;
void *p;
- if (!debug_pagealloc_enabled())
+ if (!debug_pagealloc_enabled_static())
return get_freepointer(s, object);
freepointer_addr = (unsigned long)object + s->offset;
--- a/mm/vmalloc.c~mm-debug_pagealloc-dont-rely-on-static-keys-too-early
+++ a/mm/vmalloc.c
@@ -1383,7 +1383,7 @@ static void free_unmap_vmap_area(struct
{
flush_cache_vunmap(va->va_start, va->va_end);
unmap_vmap_area(va);
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
flush_tlb_kernel_range(va->va_start, va->va_end);
free_vmap_area_noflush(va);
@@ -1681,7 +1681,7 @@ static void vb_free(const void *addr, un
vunmap_page_range((unsigned long)addr, (unsigned long)addr + size);
- if (debug_pagealloc_enabled())
+ if (debug_pagealloc_enabled_static())
flush_tlb_kernel_range((unsigned long)addr,
(unsigned long)addr + size);
_
Patches currently in -mm which might be from vbabka(a)suse.cz are
mm-thp-tweak-reclaim-compaction-effort-of-local-only-and-all-node-allocations.patch
mm-debug_pagealloc-dont-rely-on-static-keys-too-early.patch
The patch titled
Subject: mm: memcg/slab: fix percpu slab vmstats flushing
has been added to the -mm tree. Its filename is
mm-memcg-slab-fix-percpu-slab-vmstats-flushing.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-slab-fix-percpu-slab-vmst…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-slab-fix-percpu-slab-vmst…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Roman Gushchin <guro(a)fb.com>
Subject: mm: memcg/slab: fix percpu slab vmstats flushing
Currently slab percpu vmstats are flushed twice: during the memcg
offlining and just before freeing the memcg structure. Each time percpu
counters are summed, added to the atomic counterparts and propagated up by
the cgroup tree.
The second flushing is required due to how recursive vmstats are
implemented: counters are batched in percpu variables on a local level,
and once a percpu value is crossing some predefined threshold, it spills
over to atomic values on the local and each ascendant levels. It means
that without flushing some numbers cached in percpu variables will be
dropped on floor each time a cgroup is destroyed. And with uptime the
error on upper levels might become noticeable.
The first flushing aims to make counters on ancestor levels more precise.
Dying cgroups may resume in the dying state for a long time. After
kmem_cache reparenting which is performed during the offlining slab
counters of the dying cgroup don't have any chances to be updated, because
any slab operations will be performed on the parent level. It means that
the inaccuracy caused by percpu batching will not decrease up to the final
destruction of the cgroup. By the original idea flushing slab counters
during the offlining should minimize the visible inaccuracy of slab
counters on the parent level.
The problem is that percpu counters are not zeroed after the first
flushing. So every cached percpu value is summed twice. It creates a
small error (up to 32 pages per cpu, but usually less) which accumulates
on parent cgroup level. After creating and destroying of thousands of
child cgroups, slab counter on parent level can be way off the real value.
For now, let's just stop flushing slab counters on memcg offlining. It
can't be done correctly without scheduling a work on each cpu: reading and
zeroing it during css offlining can race with an asynchronous update,
which doesn't expect values to be changed underneath.
With this change, slab counters on parent level will become eventually
consistent. Once all dying children are gone, values are correct. And if
not, the error is capped by 32 * NR_CPUS pages per dying cgroup.
It's not perfect, as slab are reparented, so any updates after the
reparenting will happen on the parent level. It means that if a slab page
was allocated, a counter on child level was bumped, then the page was
reparented and freed, the annihilation of positive and negative counter
values will not happen until the child cgroup is released. It makes slab
counters different from others, and it might want us to implement flushing
in a correct form again. But it's also a question of performance:
scheduling a work on each cpu isn't free, and it's an open question if the
benefit of having more accurate counters is worth it.
We might also consider flushing all counters on offlining, not only slab
counters.
So let's fix the main problem now: make the slab counters eventually
consistent, so at least the error won't grow with uptime (or more
precisely the number of created and destroyed cgroups). And think about
the accuracy of counters separately.
Link: http://lkml.kernel.org/r/20191220042728.1045881-1-guro@fb.com
Fixes: bee07b33db78 ("mm: memcontrol: flush percpu slab vmstats on kmem offlining")
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mmzone.h | 5 ++---
mm/memcontrol.c | 37 +++++++++----------------------------
2 files changed, 11 insertions(+), 31 deletions(-)
--- a/include/linux/mmzone.h~mm-memcg-slab-fix-percpu-slab-vmstats-flushing
+++ a/include/linux/mmzone.h
@@ -215,9 +215,8 @@ enum node_stat_item {
NR_INACTIVE_FILE, /* " " " " " */
NR_ACTIVE_FILE, /* " " " " " */
NR_UNEVICTABLE, /* " " " " " */
- NR_SLAB_RECLAIMABLE, /* Please do not reorder this item */
- NR_SLAB_UNRECLAIMABLE, /* and this one without looking at
- * memcg_flush_percpu_vmstats() first. */
+ NR_SLAB_RECLAIMABLE,
+ NR_SLAB_UNRECLAIMABLE,
NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */
NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */
WORKINGSET_NODES,
--- a/mm/memcontrol.c~mm-memcg-slab-fix-percpu-slab-vmstats-flushing
+++ a/mm/memcontrol.c
@@ -3287,49 +3287,34 @@ static u64 mem_cgroup_read_u64(struct cg
}
}
-static void memcg_flush_percpu_vmstats(struct mem_cgroup *memcg, bool slab_only)
+static void memcg_flush_percpu_vmstats(struct mem_cgroup *memcg)
{
- unsigned long stat[MEMCG_NR_STAT];
+ unsigned long stat[MEMCG_NR_STAT] = {0};
struct mem_cgroup *mi;
int node, cpu, i;
- int min_idx, max_idx;
-
- if (slab_only) {
- min_idx = NR_SLAB_RECLAIMABLE;
- max_idx = NR_SLAB_UNRECLAIMABLE;
- } else {
- min_idx = 0;
- max_idx = MEMCG_NR_STAT;
- }
-
- for (i = min_idx; i < max_idx; i++)
- stat[i] = 0;
for_each_online_cpu(cpu)
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < MEMCG_NR_STAT; i++)
stat[i] += per_cpu(memcg->vmstats_percpu->stat[i], cpu);
for (mi = memcg; mi; mi = parent_mem_cgroup(mi))
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < MEMCG_NR_STAT; i++)
atomic_long_add(stat[i], &mi->vmstats[i]);
- if (!slab_only)
- max_idx = NR_VM_NODE_STAT_ITEMS;
-
for_each_node(node) {
struct mem_cgroup_per_node *pn = memcg->nodeinfo[node];
struct mem_cgroup_per_node *pi;
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
stat[i] = 0;
for_each_online_cpu(cpu)
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
stat[i] += per_cpu(
pn->lruvec_stat_cpu->count[i], cpu);
for (pi = pn; pi; pi = parent_nodeinfo(pi, node))
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
atomic_long_add(stat[i], &pi->lruvec_stat[i]);
}
}
@@ -3403,13 +3388,9 @@ static void memcg_offline_kmem(struct me
parent = root_mem_cgroup;
/*
- * Deactivate and reparent kmem_caches. Then flush percpu
- * slab statistics to have precise values at the parent and
- * all ancestor levels. It's required to keep slab stats
- * accurate after the reparenting of kmem_caches.
+ * Deactivate and reparent kmem_caches.
*/
memcg_deactivate_kmem_caches(memcg, parent);
- memcg_flush_percpu_vmstats(memcg, true);
kmemcg_id = memcg->kmemcg_id;
BUG_ON(kmemcg_id < 0);
@@ -4913,7 +4894,7 @@ static void mem_cgroup_free(struct mem_c
* Flush percpu vmstats and vmevents to guarantee the value correctness
* on parent's and all ancestor levels.
*/
- memcg_flush_percpu_vmstats(memcg, false);
+ memcg_flush_percpu_vmstats(memcg);
memcg_flush_percpu_vmevents(memcg);
__mem_cgroup_free(memcg);
}
_
Patches currently in -mm which might be from guro(a)fb.com are
mm-memcg-slab-fix-percpu-slab-vmstats-flushing.patch
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 6609fee8897ac475378388238456c84298bff802 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Fri, 6 Dec 2019 12:27:39 +0000
Subject: [PATCH] Btrfs: fix removal logic of the tree mod log that leads to
use-after-free issues
When a tree mod log user no longer needs to use the tree it calls
btrfs_put_tree_mod_seq() to remove itself from the list of users and
delete all no longer used elements of the tree's red black tree, which
should be all elements with a sequence number less then our equals to
the caller's sequence number. However the logic is broken because it
can delete and free elements from the red black tree that have a
sequence number greater then the caller's sequence number:
1) At a point in time we have sequence numbers 1, 2, 3 and 4 in the
tree mod log;
2) The task which got assigned the sequence number 1 calls
btrfs_put_tree_mod_seq();
3) Sequence number 1 is deleted from the list of sequence numbers;
4) The current minimum sequence number is computed to be the sequence
number 2;
5) A task using sequence number 2 is at tree_mod_log_rewind() and gets
a pointer to one of its elements from the red black tree through
a call to tree_mod_log_search();
6) The task with sequence number 1 iterates the red black tree of tree
modification elements and deletes (and frees) all elements with a
sequence number less then or equals to 2 (the computed minimum sequence
number) - it ends up only leaving elements with sequence numbers of 3
and 4;
7) The task with sequence number 2 now uses the pointer to its element,
already freed by the other task, at __tree_mod_log_rewind(), resulting
in a use-after-free issue. When CONFIG_DEBUG_PAGEALLOC=y it produces
a trace like the following:
[16804.546854] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI
[16804.547451] CPU: 0 PID: 28257 Comm: pool Tainted: G W 5.4.0-rc8-btrfs-next-51 #1
[16804.548059] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[16804.548666] RIP: 0010:rb_next+0x16/0x50
(...)
[16804.550581] RSP: 0018:ffffb948418ef9b0 EFLAGS: 00010202
[16804.551227] RAX: 6b6b6b6b6b6b6b6b RBX: ffff90e0247f6600 RCX: 6b6b6b6b6b6b6b6b
[16804.551873] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff90e0247f6600
[16804.552504] RBP: ffff90dffe0d4688 R08: 0000000000000001 R09: 0000000000000000
[16804.553136] R10: ffff90dffa4a0040 R11: 0000000000000000 R12: 000000000000002e
[16804.553768] R13: ffff90e0247f6600 R14: 0000000000001663 R15: ffff90dff77862b8
[16804.554399] FS: 00007f4b197ae700(0000) GS:ffff90e036a00000(0000) knlGS:0000000000000000
[16804.555039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[16804.555683] CR2: 00007f4b10022000 CR3: 00000002060e2004 CR4: 00000000003606f0
[16804.556336] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[16804.556968] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[16804.557583] Call Trace:
[16804.558207] __tree_mod_log_rewind+0xbf/0x280 [btrfs]
[16804.558835] btrfs_search_old_slot+0x105/0xd00 [btrfs]
[16804.559468] resolve_indirect_refs+0x1eb/0xc70 [btrfs]
[16804.560087] ? free_extent_buffer.part.19+0x5a/0xc0 [btrfs]
[16804.560700] find_parent_nodes+0x388/0x1120 [btrfs]
[16804.561310] btrfs_check_shared+0x115/0x1c0 [btrfs]
[16804.561916] ? extent_fiemap+0x59d/0x6d0 [btrfs]
[16804.562518] extent_fiemap+0x59d/0x6d0 [btrfs]
[16804.563112] ? __might_fault+0x11/0x90
[16804.563706] do_vfs_ioctl+0x45a/0x700
[16804.564299] ksys_ioctl+0x70/0x80
[16804.564885] ? trace_hardirqs_off_thunk+0x1a/0x20
[16804.565461] __x64_sys_ioctl+0x16/0x20
[16804.566020] do_syscall_64+0x5c/0x250
[16804.566580] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[16804.567153] RIP: 0033:0x7f4b1ba2add7
(...)
[16804.568907] RSP: 002b:00007f4b197adc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[16804.569513] RAX: ffffffffffffffda RBX: 00007f4b100210d8 RCX: 00007f4b1ba2add7
[16804.570133] RDX: 00007f4b100210d8 RSI: 00000000c020660b RDI: 0000000000000003
[16804.570726] RBP: 000055de05a6cfe0 R08: 0000000000000000 R09: 00007f4b197add44
[16804.571314] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4b197add48
[16804.571905] R13: 00007f4b197add40 R14: 00007f4b100210d0 R15: 00007f4b197add50
(...)
[16804.575623] ---[ end trace 87317359aad4ba50 ]---
Fix this by making btrfs_put_tree_mod_seq() skip deletion of elements that
have a sequence number equals to the computed minimum sequence number, and
not just elements with a sequence number greater then that minimum.
Fixes: bd989ba359f2ac ("Btrfs: add tree modification log functions")
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 5b6e86aaf2e1..24658b5a5787 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -379,7 +379,7 @@ void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info,
for (node = rb_first(tm_root); node; node = next) {
next = rb_next(node);
tm = rb_entry(node, struct tree_mod_elem, node);
- if (tm->seq > min_seq)
+ if (tm->seq >= min_seq)
continue;
rb_erase(node, tm_root);
kfree(tm);
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c7e54b5102bf3614cadb9ca32d7be73bad6cecf0 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 6 Dec 2019 09:37:15 -0500
Subject: [PATCH] btrfs: abort transaction after failed inode updates in
create_subvol
We can just abort the transaction here, and in fact do that for every
other failure in this function except these two cases.
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn(a)suse.de>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3418decb9e61..18e328ce4b54 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -704,11 +704,17 @@ static noinline int create_subvol(struct inode *dir,
btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2);
ret = btrfs_update_inode(trans, root, dir);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_add_root_ref(trans, objectid, root->root_key.objectid,
btrfs_ino(BTRFS_I(dir)), index, name, namelen);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_uuid_tree_add(trans, root_item->uuid,
BTRFS_UUID_KEY_SUBVOL, objectid);
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b6293c821ea8fa2a631a2112cd86cd435effeb8b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter(a)oracle.com>
Date: Tue, 3 Dec 2019 14:24:58 +0300
Subject: [PATCH] btrfs: return error pointer from alloc_test_extent_buffer
Callers of alloc_test_extent_buffer have not correctly interpreted the
return value as error pointer, as alloc_test_extent_buffer should behave
as alloc_extent_buffer. The self-tests were unaffected but
btrfs_find_create_tree_block could call both functions and that would
cause problems up in the call chain.
Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index eb8bd0258360..2f4802f405a2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5074,12 +5074,14 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
eb = alloc_dummy_extent_buffer(fs_info, start);
if (!eb)
- return NULL;
+ return ERR_PTR(-ENOMEM);
eb->fs_info = fs_info;
again:
ret = radix_tree_preload(GFP_NOFS);
- if (ret)
+ if (ret) {
+ exists = ERR_PTR(ret);
goto free_eb;
+ }
spin_lock(&fs_info->buffer_lock);
ret = radix_tree_insert(&fs_info->buffer_radix,
start >> PAGE_SHIFT, eb);
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 1a846bf6e197..914eea5ba6a7 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -452,9 +452,9 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root->fs_info->tree_root = root;
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_std_err(TEST_ALLOC_EXTENT_BUFFER);
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c
index 09aaca1efd62..ac035a6fa003 100644
--- a/fs/btrfs/tests/qgroup-tests.c
+++ b/fs/btrfs/tests/qgroup-tests.c
@@ -484,9 +484,9 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
* *cough*backref walking code*cough*
*/
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_err("couldn't allocate dummy buffer");
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f72ff01df9cf5db25c76674cac16605992d15467 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Tue, 19 Nov 2019 13:59:35 -0500
Subject: [PATCH] btrfs: do not call synchronize_srcu() in inode_tree_del
Testing with the new fsstress uncovered a pretty nasty deadlock with
lookup and snapshot deletion.
Process A
unlink
-> final iput
-> inode_tree_del
-> synchronize_srcu(subvol_srcu)
Process B
btrfs_lookup <- srcu_read_lock() acquired here
-> btrfs_iget
-> find inode that has I_FREEING set
-> __wait_on_freeing_inode()
We're holding the srcu_read_lock() while doing the iget in order to make
sure our fs root doesn't go away, and then we are waiting for the inode
to finish freeing. However because the free'ing process is doing a
synchronize_srcu() we deadlock.
Fix this by dropping the synchronize_srcu() in inode_tree_del(). We
don't need people to stop accessing the fs root at this point, we're
only adding our empty root to the dead roots list.
A larger much more invasive fix is forthcoming to address how we deal
with fs roots, but this fixes the immediate problem.
Fixes: 76dda93c6ae2 ("Btrfs: add snapshot/subvolume destroy ioctl")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 56032c518b26..5766c2d19896 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5728,7 +5728,6 @@ static void inode_tree_add(struct inode *inode)
static void inode_tree_del(struct inode *inode)
{
- struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
int empty = 0;
@@ -5741,7 +5740,6 @@ static void inode_tree_del(struct inode *inode)
spin_unlock(&root->inode_lock);
if (empty && btrfs_root_refs(&root->root_item) == 0) {
- synchronize_srcu(&fs_info->subvol_srcu);
spin_lock(&root->inode_lock);
empty = RB_EMPTY_ROOT(&root->inode_tree);
spin_unlock(&root->inode_lock);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 943eb3bf25f4a7b745dd799e031be276aa104d82 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Tue, 19 Nov 2019 13:59:20 -0500
Subject: [PATCH] btrfs: don't double lock the subvol_sem for rename exchange
If we're rename exchanging two subvols we'll try to lock this lock
twice, which is bad. Just lock once if either of the ino's are subvols.
Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5766c2d19896..e3c76645cad7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9554,9 +9554,8 @@ static int btrfs_rename_exchange(struct inode *old_dir,
btrfs_init_log_ctx(&ctx_dest, new_inode);
/* close the race window with snapshot create/destroy ioctl */
- if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
- down_read(&fs_info->subvol_sem);
- if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
+ if (old_ino == BTRFS_FIRST_FREE_OBJECTID ||
+ new_ino == BTRFS_FIRST_FREE_OBJECTID)
down_read(&fs_info->subvol_sem);
/*
@@ -9790,9 +9789,8 @@ static int btrfs_rename_exchange(struct inode *old_dir,
ret = ret ? ret : ret2;
}
out_notrans:
- if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
- up_read(&fs_info->subvol_sem);
- if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
+ if (new_ino == BTRFS_FIRST_FREE_OBJECTID ||
+ old_ino == BTRFS_FIRST_FREE_OBJECTID)
up_read(&fs_info->subvol_sem);
ASSERT(list_empty(&ctx_root.list));
The patch titled
Subject: mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG
has been removed from the -mm tree. Its filename was
mm-vmscan-protect-shrinker-idr-replace-with-config_memcg.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yang Shi <yang.shi(a)linux.alibaba.com>
Subject: mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG
Since commit 0a432dcbeb32edc ("mm: shrinker: make shrinker not depend on
memcg kmem"), shrinkers' idr is protected by CONFIG_MEMCG instead of
CONFIG_MEMCG_KMEM, so it makes no sense to protect shrinker idr replace
with CONFIG_MEMCG_KMEM.
And in the CONFIG_MEMCG && CONFIG_SLOB case, shrinker_idr contains only
shrinker, and it is deferred_split_shrinker. But it is never actually
called, since idr_replace() is never compiled due to the wrong #ifdef.
The deferred_split_shrinker all the time is staying in half-registered
state, and it's never called for subordinate mem cgroups.
Link: http://lkml.kernel.org/r/1575486978-45249-1-git-send-email-yang.shi@linux.a…
Fixes: 0a432dcbeb32 ("mm: shrinker: make shrinker not depend on memcg kmem")
Signed-off-by: Yang Shi <yang.shi(a)linux.alibaba.com>
Reviewed-by: Kirill Tkhai <ktkhai(a)virtuozzo.com>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Shakeel Butt <shakeelb(a)google.com>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org> [5.4+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/vmscan.c~mm-vmscan-protect-shrinker-idr-replace-with-config_memcg
+++ a/mm/vmscan.c
@@ -387,7 +387,7 @@ void register_shrinker_prepared(struct s
{
down_write(&shrinker_rwsem);
list_add_tail(&shrinker->list, &shrinker_list);
-#ifdef CONFIG_MEMCG_KMEM
+#ifdef CONFIG_MEMCG
if (shrinker->flags & SHRINKER_MEMCG_AWARE)
idr_replace(&shrinker_idr, shrinker, shrinker->id);
#endif
_
Patches currently in -mm which might be from yang.shi(a)linux.alibaba.com are
mm-move_pages-return-valid-node-id-in-status-if-the-page-is-already-on-the-target-node.patch
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 42fb6b1d41eb5905d77c06cad2e87b70289bdb76 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai(a)suse.de>
Date: Fri, 13 Dec 2019 09:51:11 +0100
Subject: [PATCH] ALSA: hda/ca0132 - Fix work handling in delayed HP detection
CA0132 has the delayed HP jack detection code that is invoked from the
unsol handler, but it does a few weird things: it contains the cancel
of a work inside the work handler, and yet it misses the cancel-sync
call at (runtime-)suspend. This patch addresses those issues.
Fixes: 15c2b3cc09a3 ("ALSA: hda/ca0132 - Fix possible workqueue stall")
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191213085111.22855-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 8d0209fff8f5..32ed46464af7 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -7607,11 +7607,10 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
/* Delay enabling the HP amp, to let the mic-detection
* state machine run.
*/
- cancel_delayed_work(&spec->unsol_hp_work);
- schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
tbl = snd_hda_jack_tbl_get(codec, cb->nid);
if (tbl)
tbl->block_report = 1;
+ schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
}
static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
@@ -8457,12 +8456,25 @@ static void ca0132_reboot_notify(struct hda_codec *codec)
codec->patch_ops.free(codec);
}
+#ifdef CONFIG_PM
+static int ca0132_suspend(struct hda_codec *codec)
+{
+ struct ca0132_spec *spec = codec->spec;
+
+ cancel_delayed_work_sync(&spec->unsol_hp_work);
+ return 0;
+}
+#endif
+
static const struct hda_codec_ops ca0132_patch_ops = {
.build_controls = ca0132_build_controls,
.build_pcms = ca0132_build_pcms,
.init = ca0132_init,
.free = ca0132_free,
.unsol_event = snd_hda_jack_unsol_event,
+#ifdef CONFIG_PM
+ .suspend = ca0132_suspend,
+#endif
.reboot_notify = ca0132_reboot_notify,
};
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 42fb6b1d41eb5905d77c06cad2e87b70289bdb76 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai(a)suse.de>
Date: Fri, 13 Dec 2019 09:51:11 +0100
Subject: [PATCH] ALSA: hda/ca0132 - Fix work handling in delayed HP detection
CA0132 has the delayed HP jack detection code that is invoked from the
unsol handler, but it does a few weird things: it contains the cancel
of a work inside the work handler, and yet it misses the cancel-sync
call at (runtime-)suspend. This patch addresses those issues.
Fixes: 15c2b3cc09a3 ("ALSA: hda/ca0132 - Fix possible workqueue stall")
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191213085111.22855-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 8d0209fff8f5..32ed46464af7 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -7607,11 +7607,10 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
/* Delay enabling the HP amp, to let the mic-detection
* state machine run.
*/
- cancel_delayed_work(&spec->unsol_hp_work);
- schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
tbl = snd_hda_jack_tbl_get(codec, cb->nid);
if (tbl)
tbl->block_report = 1;
+ schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
}
static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
@@ -8457,12 +8456,25 @@ static void ca0132_reboot_notify(struct hda_codec *codec)
codec->patch_ops.free(codec);
}
+#ifdef CONFIG_PM
+static int ca0132_suspend(struct hda_codec *codec)
+{
+ struct ca0132_spec *spec = codec->spec;
+
+ cancel_delayed_work_sync(&spec->unsol_hp_work);
+ return 0;
+}
+#endif
+
static const struct hda_codec_ops ca0132_patch_ops = {
.build_controls = ca0132_build_controls,
.build_pcms = ca0132_build_pcms,
.init = ca0132_init,
.free = ca0132_free,
.unsol_event = snd_hda_jack_unsol_event,
+#ifdef CONFIG_PM
+ .suspend = ca0132_suspend,
+#endif
.reboot_notify = ca0132_reboot_notify,
};
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 42fb6b1d41eb5905d77c06cad2e87b70289bdb76 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai(a)suse.de>
Date: Fri, 13 Dec 2019 09:51:11 +0100
Subject: [PATCH] ALSA: hda/ca0132 - Fix work handling in delayed HP detection
CA0132 has the delayed HP jack detection code that is invoked from the
unsol handler, but it does a few weird things: it contains the cancel
of a work inside the work handler, and yet it misses the cancel-sync
call at (runtime-)suspend. This patch addresses those issues.
Fixes: 15c2b3cc09a3 ("ALSA: hda/ca0132 - Fix possible workqueue stall")
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191213085111.22855-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 8d0209fff8f5..32ed46464af7 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -7607,11 +7607,10 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
/* Delay enabling the HP amp, to let the mic-detection
* state machine run.
*/
- cancel_delayed_work(&spec->unsol_hp_work);
- schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
tbl = snd_hda_jack_tbl_get(codec, cb->nid);
if (tbl)
tbl->block_report = 1;
+ schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
}
static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
@@ -8457,12 +8456,25 @@ static void ca0132_reboot_notify(struct hda_codec *codec)
codec->patch_ops.free(codec);
}
+#ifdef CONFIG_PM
+static int ca0132_suspend(struct hda_codec *codec)
+{
+ struct ca0132_spec *spec = codec->spec;
+
+ cancel_delayed_work_sync(&spec->unsol_hp_work);
+ return 0;
+}
+#endif
+
static const struct hda_codec_ops ca0132_patch_ops = {
.build_controls = ca0132_build_controls,
.build_pcms = ca0132_build_pcms,
.init = ca0132_init,
.free = ca0132_free,
.unsol_event = snd_hda_jack_unsol_event,
+#ifdef CONFIG_PM
+ .suspend = ca0132_suspend,
+#endif
.reboot_notify = ca0132_reboot_notify,
};
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 6609fee8897ac475378388238456c84298bff802 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Fri, 6 Dec 2019 12:27:39 +0000
Subject: [PATCH] Btrfs: fix removal logic of the tree mod log that leads to
use-after-free issues
When a tree mod log user no longer needs to use the tree it calls
btrfs_put_tree_mod_seq() to remove itself from the list of users and
delete all no longer used elements of the tree's red black tree, which
should be all elements with a sequence number less then our equals to
the caller's sequence number. However the logic is broken because it
can delete and free elements from the red black tree that have a
sequence number greater then the caller's sequence number:
1) At a point in time we have sequence numbers 1, 2, 3 and 4 in the
tree mod log;
2) The task which got assigned the sequence number 1 calls
btrfs_put_tree_mod_seq();
3) Sequence number 1 is deleted from the list of sequence numbers;
4) The current minimum sequence number is computed to be the sequence
number 2;
5) A task using sequence number 2 is at tree_mod_log_rewind() and gets
a pointer to one of its elements from the red black tree through
a call to tree_mod_log_search();
6) The task with sequence number 1 iterates the red black tree of tree
modification elements and deletes (and frees) all elements with a
sequence number less then or equals to 2 (the computed minimum sequence
number) - it ends up only leaving elements with sequence numbers of 3
and 4;
7) The task with sequence number 2 now uses the pointer to its element,
already freed by the other task, at __tree_mod_log_rewind(), resulting
in a use-after-free issue. When CONFIG_DEBUG_PAGEALLOC=y it produces
a trace like the following:
[16804.546854] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI
[16804.547451] CPU: 0 PID: 28257 Comm: pool Tainted: G W 5.4.0-rc8-btrfs-next-51 #1
[16804.548059] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[16804.548666] RIP: 0010:rb_next+0x16/0x50
(...)
[16804.550581] RSP: 0018:ffffb948418ef9b0 EFLAGS: 00010202
[16804.551227] RAX: 6b6b6b6b6b6b6b6b RBX: ffff90e0247f6600 RCX: 6b6b6b6b6b6b6b6b
[16804.551873] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff90e0247f6600
[16804.552504] RBP: ffff90dffe0d4688 R08: 0000000000000001 R09: 0000000000000000
[16804.553136] R10: ffff90dffa4a0040 R11: 0000000000000000 R12: 000000000000002e
[16804.553768] R13: ffff90e0247f6600 R14: 0000000000001663 R15: ffff90dff77862b8
[16804.554399] FS: 00007f4b197ae700(0000) GS:ffff90e036a00000(0000) knlGS:0000000000000000
[16804.555039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[16804.555683] CR2: 00007f4b10022000 CR3: 00000002060e2004 CR4: 00000000003606f0
[16804.556336] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[16804.556968] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[16804.557583] Call Trace:
[16804.558207] __tree_mod_log_rewind+0xbf/0x280 [btrfs]
[16804.558835] btrfs_search_old_slot+0x105/0xd00 [btrfs]
[16804.559468] resolve_indirect_refs+0x1eb/0xc70 [btrfs]
[16804.560087] ? free_extent_buffer.part.19+0x5a/0xc0 [btrfs]
[16804.560700] find_parent_nodes+0x388/0x1120 [btrfs]
[16804.561310] btrfs_check_shared+0x115/0x1c0 [btrfs]
[16804.561916] ? extent_fiemap+0x59d/0x6d0 [btrfs]
[16804.562518] extent_fiemap+0x59d/0x6d0 [btrfs]
[16804.563112] ? __might_fault+0x11/0x90
[16804.563706] do_vfs_ioctl+0x45a/0x700
[16804.564299] ksys_ioctl+0x70/0x80
[16804.564885] ? trace_hardirqs_off_thunk+0x1a/0x20
[16804.565461] __x64_sys_ioctl+0x16/0x20
[16804.566020] do_syscall_64+0x5c/0x250
[16804.566580] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[16804.567153] RIP: 0033:0x7f4b1ba2add7
(...)
[16804.568907] RSP: 002b:00007f4b197adc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[16804.569513] RAX: ffffffffffffffda RBX: 00007f4b100210d8 RCX: 00007f4b1ba2add7
[16804.570133] RDX: 00007f4b100210d8 RSI: 00000000c020660b RDI: 0000000000000003
[16804.570726] RBP: 000055de05a6cfe0 R08: 0000000000000000 R09: 00007f4b197add44
[16804.571314] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4b197add48
[16804.571905] R13: 00007f4b197add40 R14: 00007f4b100210d0 R15: 00007f4b197add50
(...)
[16804.575623] ---[ end trace 87317359aad4ba50 ]---
Fix this by making btrfs_put_tree_mod_seq() skip deletion of elements that
have a sequence number equals to the computed minimum sequence number, and
not just elements with a sequence number greater then that minimum.
Fixes: bd989ba359f2ac ("Btrfs: add tree modification log functions")
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 5b6e86aaf2e1..24658b5a5787 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -379,7 +379,7 @@ void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info,
for (node = rb_first(tm_root); node; node = next) {
next = rb_next(node);
tm = rb_entry(node, struct tree_mod_elem, node);
- if (tm->seq > min_seq)
+ if (tm->seq >= min_seq)
continue;
rb_erase(node, tm_root);
kfree(tm);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9bc574de590510eff899c3ca8dbaf013566b5efe Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 6 Dec 2019 09:37:17 -0500
Subject: [PATCH] btrfs: skip log replay on orphaned roots
My fsstress modifications coupled with generic/475 uncovered a failure
to mount and replay the log if we hit a orphaned root. We do not want
to replay the log for an orphan root, but it's completely legitimate to
have an orphaned root with a log attached. Fix this by simply skipping
replaying the log. We still need to pin it's root node so that we do
not overwrite it while replaying other logs, as we re-read the log root
at every stage of the replay.
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 79866f1b33d6..d3f115909ff0 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -6317,9 +6317,28 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
wc.replay_dest = btrfs_read_fs_root_no_name(fs_info, &tmp_key);
if (IS_ERR(wc.replay_dest)) {
ret = PTR_ERR(wc.replay_dest);
+
+ /*
+ * We didn't find the subvol, likely because it was
+ * deleted. This is ok, simply skip this log and go to
+ * the next one.
+ *
+ * We need to exclude the root because we can't have
+ * other log replays overwriting this log as we'll read
+ * it back in a few more times. This will keep our
+ * block from being modified, and we'll just bail for
+ * each subsequent pass.
+ */
+ if (ret == -ENOENT)
+ ret = btrfs_pin_extent_for_log_replay(fs_info,
+ log->node->start,
+ log->node->len);
free_extent_buffer(log->node);
free_extent_buffer(log->commit_root);
kfree(log);
+
+ if (!ret)
+ goto next;
btrfs_handle_fs_error(fs_info, ret,
"Couldn't read target root for tree log recovery.");
goto error;
@@ -6351,7 +6370,6 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
&root->highest_objectid);
}
- key.offset = found_key.offset - 1;
wc.replay_dest->log_root = NULL;
free_extent_buffer(log->node);
free_extent_buffer(log->commit_root);
@@ -6359,9 +6377,10 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
if (ret)
goto error;
-
+next:
if (found_key.offset == 0)
break;
+ key.offset = found_key.offset - 1;
}
btrfs_release_path(path);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c7e54b5102bf3614cadb9ca32d7be73bad6cecf0 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 6 Dec 2019 09:37:15 -0500
Subject: [PATCH] btrfs: abort transaction after failed inode updates in
create_subvol
We can just abort the transaction here, and in fact do that for every
other failure in this function except these two cases.
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn(a)suse.de>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3418decb9e61..18e328ce4b54 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -704,11 +704,17 @@ static noinline int create_subvol(struct inode *dir,
btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2);
ret = btrfs_update_inode(trans, root, dir);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_add_root_ref(trans, objectid, root->root_key.objectid,
btrfs_ino(BTRFS_I(dir)), index, name, namelen);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_uuid_tree_add(trans, root_item->uuid,
BTRFS_UUID_KEY_SUBVOL, objectid);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c7e54b5102bf3614cadb9ca32d7be73bad6cecf0 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 6 Dec 2019 09:37:15 -0500
Subject: [PATCH] btrfs: abort transaction after failed inode updates in
create_subvol
We can just abort the transaction here, and in fact do that for every
other failure in this function except these two cases.
CC: stable(a)vger.kernel.org # 4.4+
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn(a)suse.de>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3418decb9e61..18e328ce4b54 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -704,11 +704,17 @@ static noinline int create_subvol(struct inode *dir,
btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2);
ret = btrfs_update_inode(trans, root, dir);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_add_root_ref(trans, objectid, root->root_key.objectid,
btrfs_ino(BTRFS_I(dir)), index, name, namelen);
- BUG_ON(ret);
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
ret = btrfs_uuid_tree_add(trans, root_item->uuid,
BTRFS_UUID_KEY_SUBVOL, objectid);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 40e046acbd2f369cfbf93c3413639c66514cec2d Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Thu, 5 Dec 2019 16:58:30 +0000
Subject: [PATCH] Btrfs: fix missing data checksums after replaying a log tree
When logging a file that has shared extents (reflinked with other files or
with itself), we can end up logging multiple checksum items that cover
overlapping ranges. This confuses the search for checksums at log replay
time causing some checksums to never be added to the fs/subvolume tree.
Consider the following example of a file that shares the same extent at
offsets 0 and 256Kb:
[ bytenr 13893632, offset 64Kb, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 13893632, offset 0, len 256Kb ]
256Kb 512Kb
When logging the inode, at tree-log.c:copy_items(), when processing the
file extent item at offset 0, we log a checksum item covering the range
13959168 to 14024704, which corresponds to 13893632 + 64Kb and 13893632 +
64Kb + 64Kb, respectively.
Later when processing the extent item at offset 256K, we log the checksums
for the range from 13893632 to 14155776 (which corresponds to 13893632 +
256Kb). These checksums get merged with the checksum item for the range
from 13631488 to 13893632 (13631488 + 256Kb), logged by a previous fsync.
So after this we get the two following checksum items in the log tree:
(...)
item 6 key (EXTENT_CSUM EXTENT_CSUM 13631488) itemoff 3095 itemsize 512
range start 13631488 end 14155776 length 524288
item 7 key (EXTENT_CSUM EXTENT_CSUM 13959168) itemoff 3031 itemsize 64
range start 13959168 end 14024704 length 65536
The first one covers the range from the second one, they overlap.
So far this does not cause a problem after replaying the log, because
when replaying the file extent item for offset 256K, we copy all the
checksums for the extent 13893632 from the log tree to the fs/subvolume
tree, since searching for an checksum item for bytenr 13893632 leaves us
at the first checksum item, which covers the whole range of the extent.
However if we write 64Kb to file offset 256Kb for example, we will
not be able to find and copy the checksums for the last 128Kb of the
extent at bytenr 13893632, referenced by the file range 384Kb to 512Kb.
After writing 64Kb into file offset 256Kb we get the following extent
layout for our file:
[ bytenr 13893632, offset 64K, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 14155776, offset 0, len 64Kb ]
256Kb 320Kb
[ bytenr 13893632, offset 64Kb, len 192Kb ]
320Kb 512Kb
After fsync'ing the file, if we have a power failure and then mount
the filesystem to replay the log, the following happens:
1) When replaying the file extent item for file offset 320Kb, we
lookup for the checksums for the extent range from 13959168
(13893632 + 64Kb) to 14155776 (13893632 + 256Kb), through a call
to btrfs_lookup_csums_range();
2) btrfs_lookup_csums_range() finds the checksum item that starts
precisely at offset 13959168 (item 7 in the log tree, shown before);
3) However that checksum item only covers 64Kb of data, and not 192Kb
of data;
4) As a result only the checksums for the first 64Kb of data referenced
by the file extent item are found and copied to the fs/subvolume tree.
The remaining 128Kb of data, file range 384Kb to 512Kb, doesn't get
the corresponding data checksums found and copied to the fs/subvolume
tree.
5) After replaying the log userspace will not be able to read the file
range from 384Kb to 512Kb, because the checksums are missing and
resulting in an -EIO error.
The following steps reproduce this scenario:
$ mkfs.btrfs -f /dev/sdc
$ mount /dev/sdc /mnt/sdc
$ xfs_io -f -c "pwrite -S 0xa3 0 256K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xc7 256K 256K" /mnt/sdc/foobar
$ xfs_io -c "reflink /mnt/sdc/foobar 320K 0 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xe5 256K 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
<power failure>
$ mount /dev/sdc /mnt/sdc
$ md5sum /mnt/sdc/foobar
md5sum: /mnt/sdc/foobar: Input/output error
$ dmesg | tail
[165305.003464] BTRFS info (device sdc): no csum found for inode 257 start 401408
[165305.004014] BTRFS info (device sdc): no csum found for inode 257 start 405504
[165305.004559] BTRFS info (device sdc): no csum found for inode 257 start 409600
[165305.005101] BTRFS info (device sdc): no csum found for inode 257 start 413696
[165305.005627] BTRFS info (device sdc): no csum found for inode 257 start 417792
[165305.006134] BTRFS info (device sdc): no csum found for inode 257 start 421888
[165305.006625] BTRFS info (device sdc): no csum found for inode 257 start 425984
[165305.007278] BTRFS info (device sdc): no csum found for inode 257 start 430080
[165305.008248] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
[165305.009550] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
Fix this simply by deleting first any checksums, from the log tree, for the
range of the extent we are logging at copy_items(). This ensures we do not
get checksum items in the log tree that have overlapping ranges.
This is a long time issue that has been present since we have the clone
(and deduplication) ioctl, and can happen both when an extent is shared
between different files and within the same file.
A test case for fstests follows soon.
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b2e8fd8a8e59..54efb21c2727 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2787,7 +2787,7 @@ struct btrfs_inode_extref *btrfs_find_name_in_ext_backref(
/* file-item.c */
struct btrfs_dio_private;
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len);
+ struct btrfs_root *root, u64 bytenr, u64 len);
blk_status_t btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio,
u8 *dst);
blk_status_t btrfs_lookup_bio_sums_dio(struct inode *inode, struct bio *bio,
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 18df434bfe52..274318e9114e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1869,8 +1869,8 @@ static int cleanup_ref_head(struct btrfs_trans_handle *trans,
btrfs_pin_extent(fs_info, head->bytenr,
head->num_bytes, 1);
if (head->is_data) {
- ret = btrfs_del_csums(trans, fs_info, head->bytenr,
- head->num_bytes);
+ ret = btrfs_del_csums(trans, fs_info->csum_root,
+ head->bytenr, head->num_bytes);
}
}
@@ -3175,7 +3175,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
if (is_data) {
- ret = btrfs_del_csums(trans, info, bytenr, num_bytes);
+ ret = btrfs_del_csums(trans, info->csum_root, bytenr,
+ num_bytes);
if (ret) {
btrfs_abort_transaction(trans, ret);
goto out;
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 3270a40b0777..b1bfdc5c1387 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -590,9 +590,9 @@ static noinline void truncate_one_csum(struct btrfs_fs_info *fs_info,
* range of bytes.
*/
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len)
+ struct btrfs_root *root, u64 bytenr, u64 len)
{
- struct btrfs_root *root = fs_info->csum_root;
+ struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_path *path;
struct btrfs_key key;
u64 end_byte = bytenr + len;
@@ -602,6 +602,9 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);
int blocksize_bits = fs_info->sb->s_blocksize_bits;
+ ASSERT(root == fs_info->csum_root ||
+ root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID);
+
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 6f757361db53..79866f1b33d6 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -808,7 +808,8 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_del_csums(trans, fs_info,
+ ret = btrfs_del_csums(trans,
+ fs_info->csum_root,
sums->bytenr,
sums->len);
if (!ret)
@@ -3909,6 +3910,28 @@ static int log_inode_item(struct btrfs_trans_handle *trans,
return 0;
}
+static int log_csums(struct btrfs_trans_handle *trans,
+ struct btrfs_root *log_root,
+ struct btrfs_ordered_sum *sums)
+{
+ int ret;
+
+ /*
+ * Due to extent cloning, we might have logged a csum item that covers a
+ * subrange of a cloned extent, and later we can end up logging a csum
+ * item for a larger subrange of the same extent or the entire range.
+ * This would leave csum items in the log tree that cover the same range
+ * and break the searches for checksums in the log tree, resulting in
+ * some checksums missing in the fs/subvolume tree. So just delete (or
+ * trim and adjust) any existing csum items in the log for this range.
+ */
+ ret = btrfs_del_csums(trans, log_root, sums->bytenr, sums->len);
+ if (ret)
+ return ret;
+
+ return btrfs_csum_file_blocks(trans, log_root, sums);
+}
+
static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_inode *inode,
struct btrfs_path *dst_path,
@@ -4054,7 +4077,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log, sums);
+ ret = log_csums(trans, log, sums);
list_del(&sums->list);
kfree(sums);
}
@@ -4274,7 +4297,7 @@ static int log_extent_csums(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log_root, sums);
+ ret = log_csums(trans, log_root, sums);
list_del(&sums->list);
kfree(sums);
}
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 40e046acbd2f369cfbf93c3413639c66514cec2d Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Thu, 5 Dec 2019 16:58:30 +0000
Subject: [PATCH] Btrfs: fix missing data checksums after replaying a log tree
When logging a file that has shared extents (reflinked with other files or
with itself), we can end up logging multiple checksum items that cover
overlapping ranges. This confuses the search for checksums at log replay
time causing some checksums to never be added to the fs/subvolume tree.
Consider the following example of a file that shares the same extent at
offsets 0 and 256Kb:
[ bytenr 13893632, offset 64Kb, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 13893632, offset 0, len 256Kb ]
256Kb 512Kb
When logging the inode, at tree-log.c:copy_items(), when processing the
file extent item at offset 0, we log a checksum item covering the range
13959168 to 14024704, which corresponds to 13893632 + 64Kb and 13893632 +
64Kb + 64Kb, respectively.
Later when processing the extent item at offset 256K, we log the checksums
for the range from 13893632 to 14155776 (which corresponds to 13893632 +
256Kb). These checksums get merged with the checksum item for the range
from 13631488 to 13893632 (13631488 + 256Kb), logged by a previous fsync.
So after this we get the two following checksum items in the log tree:
(...)
item 6 key (EXTENT_CSUM EXTENT_CSUM 13631488) itemoff 3095 itemsize 512
range start 13631488 end 14155776 length 524288
item 7 key (EXTENT_CSUM EXTENT_CSUM 13959168) itemoff 3031 itemsize 64
range start 13959168 end 14024704 length 65536
The first one covers the range from the second one, they overlap.
So far this does not cause a problem after replaying the log, because
when replaying the file extent item for offset 256K, we copy all the
checksums for the extent 13893632 from the log tree to the fs/subvolume
tree, since searching for an checksum item for bytenr 13893632 leaves us
at the first checksum item, which covers the whole range of the extent.
However if we write 64Kb to file offset 256Kb for example, we will
not be able to find and copy the checksums for the last 128Kb of the
extent at bytenr 13893632, referenced by the file range 384Kb to 512Kb.
After writing 64Kb into file offset 256Kb we get the following extent
layout for our file:
[ bytenr 13893632, offset 64K, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 14155776, offset 0, len 64Kb ]
256Kb 320Kb
[ bytenr 13893632, offset 64Kb, len 192Kb ]
320Kb 512Kb
After fsync'ing the file, if we have a power failure and then mount
the filesystem to replay the log, the following happens:
1) When replaying the file extent item for file offset 320Kb, we
lookup for the checksums for the extent range from 13959168
(13893632 + 64Kb) to 14155776 (13893632 + 256Kb), through a call
to btrfs_lookup_csums_range();
2) btrfs_lookup_csums_range() finds the checksum item that starts
precisely at offset 13959168 (item 7 in the log tree, shown before);
3) However that checksum item only covers 64Kb of data, and not 192Kb
of data;
4) As a result only the checksums for the first 64Kb of data referenced
by the file extent item are found and copied to the fs/subvolume tree.
The remaining 128Kb of data, file range 384Kb to 512Kb, doesn't get
the corresponding data checksums found and copied to the fs/subvolume
tree.
5) After replaying the log userspace will not be able to read the file
range from 384Kb to 512Kb, because the checksums are missing and
resulting in an -EIO error.
The following steps reproduce this scenario:
$ mkfs.btrfs -f /dev/sdc
$ mount /dev/sdc /mnt/sdc
$ xfs_io -f -c "pwrite -S 0xa3 0 256K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xc7 256K 256K" /mnt/sdc/foobar
$ xfs_io -c "reflink /mnt/sdc/foobar 320K 0 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xe5 256K 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
<power failure>
$ mount /dev/sdc /mnt/sdc
$ md5sum /mnt/sdc/foobar
md5sum: /mnt/sdc/foobar: Input/output error
$ dmesg | tail
[165305.003464] BTRFS info (device sdc): no csum found for inode 257 start 401408
[165305.004014] BTRFS info (device sdc): no csum found for inode 257 start 405504
[165305.004559] BTRFS info (device sdc): no csum found for inode 257 start 409600
[165305.005101] BTRFS info (device sdc): no csum found for inode 257 start 413696
[165305.005627] BTRFS info (device sdc): no csum found for inode 257 start 417792
[165305.006134] BTRFS info (device sdc): no csum found for inode 257 start 421888
[165305.006625] BTRFS info (device sdc): no csum found for inode 257 start 425984
[165305.007278] BTRFS info (device sdc): no csum found for inode 257 start 430080
[165305.008248] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
[165305.009550] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
Fix this simply by deleting first any checksums, from the log tree, for the
range of the extent we are logging at copy_items(). This ensures we do not
get checksum items in the log tree that have overlapping ranges.
This is a long time issue that has been present since we have the clone
(and deduplication) ioctl, and can happen both when an extent is shared
between different files and within the same file.
A test case for fstests follows soon.
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b2e8fd8a8e59..54efb21c2727 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2787,7 +2787,7 @@ struct btrfs_inode_extref *btrfs_find_name_in_ext_backref(
/* file-item.c */
struct btrfs_dio_private;
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len);
+ struct btrfs_root *root, u64 bytenr, u64 len);
blk_status_t btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio,
u8 *dst);
blk_status_t btrfs_lookup_bio_sums_dio(struct inode *inode, struct bio *bio,
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 18df434bfe52..274318e9114e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1869,8 +1869,8 @@ static int cleanup_ref_head(struct btrfs_trans_handle *trans,
btrfs_pin_extent(fs_info, head->bytenr,
head->num_bytes, 1);
if (head->is_data) {
- ret = btrfs_del_csums(trans, fs_info, head->bytenr,
- head->num_bytes);
+ ret = btrfs_del_csums(trans, fs_info->csum_root,
+ head->bytenr, head->num_bytes);
}
}
@@ -3175,7 +3175,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
if (is_data) {
- ret = btrfs_del_csums(trans, info, bytenr, num_bytes);
+ ret = btrfs_del_csums(trans, info->csum_root, bytenr,
+ num_bytes);
if (ret) {
btrfs_abort_transaction(trans, ret);
goto out;
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 3270a40b0777..b1bfdc5c1387 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -590,9 +590,9 @@ static noinline void truncate_one_csum(struct btrfs_fs_info *fs_info,
* range of bytes.
*/
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len)
+ struct btrfs_root *root, u64 bytenr, u64 len)
{
- struct btrfs_root *root = fs_info->csum_root;
+ struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_path *path;
struct btrfs_key key;
u64 end_byte = bytenr + len;
@@ -602,6 +602,9 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);
int blocksize_bits = fs_info->sb->s_blocksize_bits;
+ ASSERT(root == fs_info->csum_root ||
+ root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID);
+
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 6f757361db53..79866f1b33d6 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -808,7 +808,8 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_del_csums(trans, fs_info,
+ ret = btrfs_del_csums(trans,
+ fs_info->csum_root,
sums->bytenr,
sums->len);
if (!ret)
@@ -3909,6 +3910,28 @@ static int log_inode_item(struct btrfs_trans_handle *trans,
return 0;
}
+static int log_csums(struct btrfs_trans_handle *trans,
+ struct btrfs_root *log_root,
+ struct btrfs_ordered_sum *sums)
+{
+ int ret;
+
+ /*
+ * Due to extent cloning, we might have logged a csum item that covers a
+ * subrange of a cloned extent, and later we can end up logging a csum
+ * item for a larger subrange of the same extent or the entire range.
+ * This would leave csum items in the log tree that cover the same range
+ * and break the searches for checksums in the log tree, resulting in
+ * some checksums missing in the fs/subvolume tree. So just delete (or
+ * trim and adjust) any existing csum items in the log for this range.
+ */
+ ret = btrfs_del_csums(trans, log_root, sums->bytenr, sums->len);
+ if (ret)
+ return ret;
+
+ return btrfs_csum_file_blocks(trans, log_root, sums);
+}
+
static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_inode *inode,
struct btrfs_path *dst_path,
@@ -4054,7 +4077,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log, sums);
+ ret = log_csums(trans, log, sums);
list_del(&sums->list);
kfree(sums);
}
@@ -4274,7 +4297,7 @@ static int log_extent_csums(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log_root, sums);
+ ret = log_csums(trans, log_root, sums);
list_del(&sums->list);
kfree(sums);
}
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 40e046acbd2f369cfbf93c3413639c66514cec2d Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Thu, 5 Dec 2019 16:58:30 +0000
Subject: [PATCH] Btrfs: fix missing data checksums after replaying a log tree
When logging a file that has shared extents (reflinked with other files or
with itself), we can end up logging multiple checksum items that cover
overlapping ranges. This confuses the search for checksums at log replay
time causing some checksums to never be added to the fs/subvolume tree.
Consider the following example of a file that shares the same extent at
offsets 0 and 256Kb:
[ bytenr 13893632, offset 64Kb, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 13893632, offset 0, len 256Kb ]
256Kb 512Kb
When logging the inode, at tree-log.c:copy_items(), when processing the
file extent item at offset 0, we log a checksum item covering the range
13959168 to 14024704, which corresponds to 13893632 + 64Kb and 13893632 +
64Kb + 64Kb, respectively.
Later when processing the extent item at offset 256K, we log the checksums
for the range from 13893632 to 14155776 (which corresponds to 13893632 +
256Kb). These checksums get merged with the checksum item for the range
from 13631488 to 13893632 (13631488 + 256Kb), logged by a previous fsync.
So after this we get the two following checksum items in the log tree:
(...)
item 6 key (EXTENT_CSUM EXTENT_CSUM 13631488) itemoff 3095 itemsize 512
range start 13631488 end 14155776 length 524288
item 7 key (EXTENT_CSUM EXTENT_CSUM 13959168) itemoff 3031 itemsize 64
range start 13959168 end 14024704 length 65536
The first one covers the range from the second one, they overlap.
So far this does not cause a problem after replaying the log, because
when replaying the file extent item for offset 256K, we copy all the
checksums for the extent 13893632 from the log tree to the fs/subvolume
tree, since searching for an checksum item for bytenr 13893632 leaves us
at the first checksum item, which covers the whole range of the extent.
However if we write 64Kb to file offset 256Kb for example, we will
not be able to find and copy the checksums for the last 128Kb of the
extent at bytenr 13893632, referenced by the file range 384Kb to 512Kb.
After writing 64Kb into file offset 256Kb we get the following extent
layout for our file:
[ bytenr 13893632, offset 64K, len 64Kb ]
0 64Kb
[ bytenr 13631488, offset 64Kb, len 192Kb ]
64Kb 256Kb
[ bytenr 14155776, offset 0, len 64Kb ]
256Kb 320Kb
[ bytenr 13893632, offset 64Kb, len 192Kb ]
320Kb 512Kb
After fsync'ing the file, if we have a power failure and then mount
the filesystem to replay the log, the following happens:
1) When replaying the file extent item for file offset 320Kb, we
lookup for the checksums for the extent range from 13959168
(13893632 + 64Kb) to 14155776 (13893632 + 256Kb), through a call
to btrfs_lookup_csums_range();
2) btrfs_lookup_csums_range() finds the checksum item that starts
precisely at offset 13959168 (item 7 in the log tree, shown before);
3) However that checksum item only covers 64Kb of data, and not 192Kb
of data;
4) As a result only the checksums for the first 64Kb of data referenced
by the file extent item are found and copied to the fs/subvolume tree.
The remaining 128Kb of data, file range 384Kb to 512Kb, doesn't get
the corresponding data checksums found and copied to the fs/subvolume
tree.
5) After replaying the log userspace will not be able to read the file
range from 384Kb to 512Kb, because the checksums are missing and
resulting in an -EIO error.
The following steps reproduce this scenario:
$ mkfs.btrfs -f /dev/sdc
$ mount /dev/sdc /mnt/sdc
$ xfs_io -f -c "pwrite -S 0xa3 0 256K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xc7 256K 256K" /mnt/sdc/foobar
$ xfs_io -c "reflink /mnt/sdc/foobar 320K 0 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
$ xfs_io -c "pwrite -S 0xe5 256K 64K" /mnt/sdc/foobar
$ xfs_io -c "fsync" /mnt/sdc/foobar
<power failure>
$ mount /dev/sdc /mnt/sdc
$ md5sum /mnt/sdc/foobar
md5sum: /mnt/sdc/foobar: Input/output error
$ dmesg | tail
[165305.003464] BTRFS info (device sdc): no csum found for inode 257 start 401408
[165305.004014] BTRFS info (device sdc): no csum found for inode 257 start 405504
[165305.004559] BTRFS info (device sdc): no csum found for inode 257 start 409600
[165305.005101] BTRFS info (device sdc): no csum found for inode 257 start 413696
[165305.005627] BTRFS info (device sdc): no csum found for inode 257 start 417792
[165305.006134] BTRFS info (device sdc): no csum found for inode 257 start 421888
[165305.006625] BTRFS info (device sdc): no csum found for inode 257 start 425984
[165305.007278] BTRFS info (device sdc): no csum found for inode 257 start 430080
[165305.008248] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
[165305.009550] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1
Fix this simply by deleting first any checksums, from the log tree, for the
range of the extent we are logging at copy_items(). This ensures we do not
get checksum items in the log tree that have overlapping ranges.
This is a long time issue that has been present since we have the clone
(and deduplication) ioctl, and can happen both when an extent is shared
between different files and within the same file.
A test case for fstests follows soon.
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b2e8fd8a8e59..54efb21c2727 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2787,7 +2787,7 @@ struct btrfs_inode_extref *btrfs_find_name_in_ext_backref(
/* file-item.c */
struct btrfs_dio_private;
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len);
+ struct btrfs_root *root, u64 bytenr, u64 len);
blk_status_t btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio,
u8 *dst);
blk_status_t btrfs_lookup_bio_sums_dio(struct inode *inode, struct bio *bio,
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 18df434bfe52..274318e9114e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1869,8 +1869,8 @@ static int cleanup_ref_head(struct btrfs_trans_handle *trans,
btrfs_pin_extent(fs_info, head->bytenr,
head->num_bytes, 1);
if (head->is_data) {
- ret = btrfs_del_csums(trans, fs_info, head->bytenr,
- head->num_bytes);
+ ret = btrfs_del_csums(trans, fs_info->csum_root,
+ head->bytenr, head->num_bytes);
}
}
@@ -3175,7 +3175,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
if (is_data) {
- ret = btrfs_del_csums(trans, info, bytenr, num_bytes);
+ ret = btrfs_del_csums(trans, info->csum_root, bytenr,
+ num_bytes);
if (ret) {
btrfs_abort_transaction(trans, ret);
goto out;
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 3270a40b0777..b1bfdc5c1387 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -590,9 +590,9 @@ static noinline void truncate_one_csum(struct btrfs_fs_info *fs_info,
* range of bytes.
*/
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 bytenr, u64 len)
+ struct btrfs_root *root, u64 bytenr, u64 len)
{
- struct btrfs_root *root = fs_info->csum_root;
+ struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_path *path;
struct btrfs_key key;
u64 end_byte = bytenr + len;
@@ -602,6 +602,9 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);
int blocksize_bits = fs_info->sb->s_blocksize_bits;
+ ASSERT(root == fs_info->csum_root ||
+ root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID);
+
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 6f757361db53..79866f1b33d6 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -808,7 +808,8 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_del_csums(trans, fs_info,
+ ret = btrfs_del_csums(trans,
+ fs_info->csum_root,
sums->bytenr,
sums->len);
if (!ret)
@@ -3909,6 +3910,28 @@ static int log_inode_item(struct btrfs_trans_handle *trans,
return 0;
}
+static int log_csums(struct btrfs_trans_handle *trans,
+ struct btrfs_root *log_root,
+ struct btrfs_ordered_sum *sums)
+{
+ int ret;
+
+ /*
+ * Due to extent cloning, we might have logged a csum item that covers a
+ * subrange of a cloned extent, and later we can end up logging a csum
+ * item for a larger subrange of the same extent or the entire range.
+ * This would leave csum items in the log tree that cover the same range
+ * and break the searches for checksums in the log tree, resulting in
+ * some checksums missing in the fs/subvolume tree. So just delete (or
+ * trim and adjust) any existing csum items in the log for this range.
+ */
+ ret = btrfs_del_csums(trans, log_root, sums->bytenr, sums->len);
+ if (ret)
+ return ret;
+
+ return btrfs_csum_file_blocks(trans, log_root, sums);
+}
+
static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_inode *inode,
struct btrfs_path *dst_path,
@@ -4054,7 +4077,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log, sums);
+ ret = log_csums(trans, log, sums);
list_del(&sums->list);
kfree(sums);
}
@@ -4274,7 +4297,7 @@ static int log_extent_csums(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum,
list);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log_root, sums);
+ ret = log_csums(trans, log_root, sums);
list_del(&sums->list);
kfree(sums);
}
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b6293c821ea8fa2a631a2112cd86cd435effeb8b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter(a)oracle.com>
Date: Tue, 3 Dec 2019 14:24:58 +0300
Subject: [PATCH] btrfs: return error pointer from alloc_test_extent_buffer
Callers of alloc_test_extent_buffer have not correctly interpreted the
return value as error pointer, as alloc_test_extent_buffer should behave
as alloc_extent_buffer. The self-tests were unaffected but
btrfs_find_create_tree_block could call both functions and that would
cause problems up in the call chain.
Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index eb8bd0258360..2f4802f405a2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5074,12 +5074,14 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
eb = alloc_dummy_extent_buffer(fs_info, start);
if (!eb)
- return NULL;
+ return ERR_PTR(-ENOMEM);
eb->fs_info = fs_info;
again:
ret = radix_tree_preload(GFP_NOFS);
- if (ret)
+ if (ret) {
+ exists = ERR_PTR(ret);
goto free_eb;
+ }
spin_lock(&fs_info->buffer_lock);
ret = radix_tree_insert(&fs_info->buffer_radix,
start >> PAGE_SHIFT, eb);
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 1a846bf6e197..914eea5ba6a7 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -452,9 +452,9 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root->fs_info->tree_root = root;
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_std_err(TEST_ALLOC_EXTENT_BUFFER);
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c
index 09aaca1efd62..ac035a6fa003 100644
--- a/fs/btrfs/tests/qgroup-tests.c
+++ b/fs/btrfs/tests/qgroup-tests.c
@@ -484,9 +484,9 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
* *cough*backref walking code*cough*
*/
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_err("couldn't allocate dummy buffer");
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b6293c821ea8fa2a631a2112cd86cd435effeb8b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter(a)oracle.com>
Date: Tue, 3 Dec 2019 14:24:58 +0300
Subject: [PATCH] btrfs: return error pointer from alloc_test_extent_buffer
Callers of alloc_test_extent_buffer have not correctly interpreted the
return value as error pointer, as alloc_test_extent_buffer should behave
as alloc_extent_buffer. The self-tests were unaffected but
btrfs_find_create_tree_block could call both functions and that would
cause problems up in the call chain.
Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index eb8bd0258360..2f4802f405a2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5074,12 +5074,14 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
eb = alloc_dummy_extent_buffer(fs_info, start);
if (!eb)
- return NULL;
+ return ERR_PTR(-ENOMEM);
eb->fs_info = fs_info;
again:
ret = radix_tree_preload(GFP_NOFS);
- if (ret)
+ if (ret) {
+ exists = ERR_PTR(ret);
goto free_eb;
+ }
spin_lock(&fs_info->buffer_lock);
ret = radix_tree_insert(&fs_info->buffer_radix,
start >> PAGE_SHIFT, eb);
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 1a846bf6e197..914eea5ba6a7 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -452,9 +452,9 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root->fs_info->tree_root = root;
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_std_err(TEST_ALLOC_EXTENT_BUFFER);
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c
index 09aaca1efd62..ac035a6fa003 100644
--- a/fs/btrfs/tests/qgroup-tests.c
+++ b/fs/btrfs/tests/qgroup-tests.c
@@ -484,9 +484,9 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
* *cough*backref walking code*cough*
*/
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_err("couldn't allocate dummy buffer");
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b6293c821ea8fa2a631a2112cd86cd435effeb8b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter(a)oracle.com>
Date: Tue, 3 Dec 2019 14:24:58 +0300
Subject: [PATCH] btrfs: return error pointer from alloc_test_extent_buffer
Callers of alloc_test_extent_buffer have not correctly interpreted the
return value as error pointer, as alloc_test_extent_buffer should behave
as alloc_extent_buffer. The self-tests were unaffected but
btrfs_find_create_tree_block could call both functions and that would
cause problems up in the call chain.
Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index eb8bd0258360..2f4802f405a2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5074,12 +5074,14 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
eb = alloc_dummy_extent_buffer(fs_info, start);
if (!eb)
- return NULL;
+ return ERR_PTR(-ENOMEM);
eb->fs_info = fs_info;
again:
ret = radix_tree_preload(GFP_NOFS);
- if (ret)
+ if (ret) {
+ exists = ERR_PTR(ret);
goto free_eb;
+ }
spin_lock(&fs_info->buffer_lock);
ret = radix_tree_insert(&fs_info->buffer_radix,
start >> PAGE_SHIFT, eb);
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 1a846bf6e197..914eea5ba6a7 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -452,9 +452,9 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root->fs_info->tree_root = root;
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_std_err(TEST_ALLOC_EXTENT_BUFFER);
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c
index 09aaca1efd62..ac035a6fa003 100644
--- a/fs/btrfs/tests/qgroup-tests.c
+++ b/fs/btrfs/tests/qgroup-tests.c
@@ -484,9 +484,9 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
* *cough*backref walking code*cough*
*/
root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
- if (!root->node) {
+ if (IS_ERR(root->node)) {
test_err("couldn't allocate dummy buffer");
- ret = -ENOMEM;
+ ret = PTR_ERR(root->node);
goto out;
}
btrfs_set_header_level(root->node, 0);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ad1d8c439978ede77cbf73cbdd11bafe810421a5 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Mon, 2 Dec 2019 11:01:03 +0000
Subject: [PATCH] Btrfs: make tree checker detect checksum items with
overlapping ranges
Having checksum items, either on the checksums tree or in a log tree, that
represent ranges that overlap each other is a sign of a corruption. Such
case confuses the checksum lookup code and can result in not being able to
find checksums or find stale checksums.
So add a check for such case.
This is motivated by a recent fix for a case where a log tree had checksum
items covering ranges that overlap each other due to extent cloning, and
resulted in missing checksums after replaying the log tree. It also helps
detect past issues such as stale and outdated checksums due to overlapping,
commit 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and
outdated checksums").
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 092b8ece36d7..97f3520b8d98 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -332,7 +332,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
}
static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
- int slot)
+ int slot, struct btrfs_key *prev_key)
{
struct btrfs_fs_info *fs_info = leaf->fs_info;
u32 sectorsize = fs_info->sectorsize;
@@ -356,6 +356,20 @@ static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
btrfs_item_size_nr(leaf, slot), csumsize);
return -EUCLEAN;
}
+ if (slot > 0 && prev_key->type == BTRFS_EXTENT_CSUM_KEY) {
+ u64 prev_csum_end;
+ u32 prev_item_size;
+
+ prev_item_size = btrfs_item_size_nr(leaf, slot - 1);
+ prev_csum_end = (prev_item_size / csumsize) * sectorsize;
+ prev_csum_end += prev_key->offset;
+ if (prev_csum_end > key->offset) {
+ generic_err(leaf, slot - 1,
+"csum end range (%llu) goes beyond the start range (%llu) of the next csum item",
+ prev_csum_end, key->offset);
+ return -EUCLEAN;
+ }
+ }
return 0;
}
@@ -1355,7 +1369,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
ret = check_extent_data_item(leaf, key, slot, prev_key);
break;
case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(leaf, key, slot);
+ ret = check_csum_item(leaf, key, slot, prev_key);
break;
case BTRFS_DIR_ITEM_KEY:
case BTRFS_DIR_INDEX_KEY:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ad1d8c439978ede77cbf73cbdd11bafe810421a5 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Mon, 2 Dec 2019 11:01:03 +0000
Subject: [PATCH] Btrfs: make tree checker detect checksum items with
overlapping ranges
Having checksum items, either on the checksums tree or in a log tree, that
represent ranges that overlap each other is a sign of a corruption. Such
case confuses the checksum lookup code and can result in not being able to
find checksums or find stale checksums.
So add a check for such case.
This is motivated by a recent fix for a case where a log tree had checksum
items covering ranges that overlap each other due to extent cloning, and
resulted in missing checksums after replaying the log tree. It also helps
detect past issues such as stale and outdated checksums due to overlapping,
commit 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and
outdated checksums").
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 092b8ece36d7..97f3520b8d98 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -332,7 +332,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
}
static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
- int slot)
+ int slot, struct btrfs_key *prev_key)
{
struct btrfs_fs_info *fs_info = leaf->fs_info;
u32 sectorsize = fs_info->sectorsize;
@@ -356,6 +356,20 @@ static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
btrfs_item_size_nr(leaf, slot), csumsize);
return -EUCLEAN;
}
+ if (slot > 0 && prev_key->type == BTRFS_EXTENT_CSUM_KEY) {
+ u64 prev_csum_end;
+ u32 prev_item_size;
+
+ prev_item_size = btrfs_item_size_nr(leaf, slot - 1);
+ prev_csum_end = (prev_item_size / csumsize) * sectorsize;
+ prev_csum_end += prev_key->offset;
+ if (prev_csum_end > key->offset) {
+ generic_err(leaf, slot - 1,
+"csum end range (%llu) goes beyond the start range (%llu) of the next csum item",
+ prev_csum_end, key->offset);
+ return -EUCLEAN;
+ }
+ }
return 0;
}
@@ -1355,7 +1369,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
ret = check_extent_data_item(leaf, key, slot, prev_key);
break;
case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(leaf, key, slot);
+ ret = check_csum_item(leaf, key, slot, prev_key);
break;
case BTRFS_DIR_ITEM_KEY:
case BTRFS_DIR_INDEX_KEY:
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ad1d8c439978ede77cbf73cbdd11bafe810421a5 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Mon, 2 Dec 2019 11:01:03 +0000
Subject: [PATCH] Btrfs: make tree checker detect checksum items with
overlapping ranges
Having checksum items, either on the checksums tree or in a log tree, that
represent ranges that overlap each other is a sign of a corruption. Such
case confuses the checksum lookup code and can result in not being able to
find checksums or find stale checksums.
So add a check for such case.
This is motivated by a recent fix for a case where a log tree had checksum
items covering ranges that overlap each other due to extent cloning, and
resulted in missing checksums after replaying the log tree. It also helps
detect past issues such as stale and outdated checksums due to overlapping,
commit 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and
outdated checksums").
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 092b8ece36d7..97f3520b8d98 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -332,7 +332,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
}
static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
- int slot)
+ int slot, struct btrfs_key *prev_key)
{
struct btrfs_fs_info *fs_info = leaf->fs_info;
u32 sectorsize = fs_info->sectorsize;
@@ -356,6 +356,20 @@ static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
btrfs_item_size_nr(leaf, slot), csumsize);
return -EUCLEAN;
}
+ if (slot > 0 && prev_key->type == BTRFS_EXTENT_CSUM_KEY) {
+ u64 prev_csum_end;
+ u32 prev_item_size;
+
+ prev_item_size = btrfs_item_size_nr(leaf, slot - 1);
+ prev_csum_end = (prev_item_size / csumsize) * sectorsize;
+ prev_csum_end += prev_key->offset;
+ if (prev_csum_end > key->offset) {
+ generic_err(leaf, slot - 1,
+"csum end range (%llu) goes beyond the start range (%llu) of the next csum item",
+ prev_csum_end, key->offset);
+ return -EUCLEAN;
+ }
+ }
return 0;
}
@@ -1355,7 +1369,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
ret = check_extent_data_item(leaf, key, slot, prev_key);
break;
case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(leaf, key, slot);
+ ret = check_csum_item(leaf, key, slot, prev_key);
break;
case BTRFS_DIR_ITEM_KEY:
case BTRFS_DIR_INDEX_KEY:
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ad1d8c439978ede77cbf73cbdd11bafe810421a5 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Mon, 2 Dec 2019 11:01:03 +0000
Subject: [PATCH] Btrfs: make tree checker detect checksum items with
overlapping ranges
Having checksum items, either on the checksums tree or in a log tree, that
represent ranges that overlap each other is a sign of a corruption. Such
case confuses the checksum lookup code and can result in not being able to
find checksums or find stale checksums.
So add a check for such case.
This is motivated by a recent fix for a case where a log tree had checksum
items covering ranges that overlap each other due to extent cloning, and
resulted in missing checksums after replaying the log tree. It also helps
detect past issues such as stale and outdated checksums due to overlapping,
commit 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and
outdated checksums").
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 092b8ece36d7..97f3520b8d98 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -332,7 +332,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
}
static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
- int slot)
+ int slot, struct btrfs_key *prev_key)
{
struct btrfs_fs_info *fs_info = leaf->fs_info;
u32 sectorsize = fs_info->sectorsize;
@@ -356,6 +356,20 @@ static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
btrfs_item_size_nr(leaf, slot), csumsize);
return -EUCLEAN;
}
+ if (slot > 0 && prev_key->type == BTRFS_EXTENT_CSUM_KEY) {
+ u64 prev_csum_end;
+ u32 prev_item_size;
+
+ prev_item_size = btrfs_item_size_nr(leaf, slot - 1);
+ prev_csum_end = (prev_item_size / csumsize) * sectorsize;
+ prev_csum_end += prev_key->offset;
+ if (prev_csum_end > key->offset) {
+ generic_err(leaf, slot - 1,
+"csum end range (%llu) goes beyond the start range (%llu) of the next csum item",
+ prev_csum_end, key->offset);
+ return -EUCLEAN;
+ }
+ }
return 0;
}
@@ -1355,7 +1369,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
ret = check_extent_data_item(leaf, key, slot, prev_key);
break;
case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(leaf, key, slot);
+ ret = check_csum_item(leaf, key, slot, prev_key);
break;
case BTRFS_DIR_ITEM_KEY:
case BTRFS_DIR_INDEX_KEY:
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f72ff01df9cf5db25c76674cac16605992d15467 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Tue, 19 Nov 2019 13:59:35 -0500
Subject: [PATCH] btrfs: do not call synchronize_srcu() in inode_tree_del
Testing with the new fsstress uncovered a pretty nasty deadlock with
lookup and snapshot deletion.
Process A
unlink
-> final iput
-> inode_tree_del
-> synchronize_srcu(subvol_srcu)
Process B
btrfs_lookup <- srcu_read_lock() acquired here
-> btrfs_iget
-> find inode that has I_FREEING set
-> __wait_on_freeing_inode()
We're holding the srcu_read_lock() while doing the iget in order to make
sure our fs root doesn't go away, and then we are waiting for the inode
to finish freeing. However because the free'ing process is doing a
synchronize_srcu() we deadlock.
Fix this by dropping the synchronize_srcu() in inode_tree_del(). We
don't need people to stop accessing the fs root at this point, we're
only adding our empty root to the dead roots list.
A larger much more invasive fix is forthcoming to address how we deal
with fs roots, but this fixes the immediate problem.
Fixes: 76dda93c6ae2 ("Btrfs: add snapshot/subvolume destroy ioctl")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 56032c518b26..5766c2d19896 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5728,7 +5728,6 @@ static void inode_tree_add(struct inode *inode)
static void inode_tree_del(struct inode *inode)
{
- struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
int empty = 0;
@@ -5741,7 +5740,6 @@ static void inode_tree_del(struct inode *inode)
spin_unlock(&root->inode_lock);
if (empty && btrfs_root_refs(&root->root_item) == 0) {
- synchronize_srcu(&fs_info->subvol_srcu);
spin_lock(&root->inode_lock);
empty = RB_EMPTY_ROOT(&root->inode_tree);
spin_unlock(&root->inode_lock);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 943eb3bf25f4a7b745dd799e031be276aa104d82 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Tue, 19 Nov 2019 13:59:20 -0500
Subject: [PATCH] btrfs: don't double lock the subvol_sem for rename exchange
If we're rename exchanging two subvols we'll try to lock this lock
twice, which is bad. Just lock once if either of the ino's are subvols.
Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5766c2d19896..e3c76645cad7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9554,9 +9554,8 @@ static int btrfs_rename_exchange(struct inode *old_dir,
btrfs_init_log_ctx(&ctx_dest, new_inode);
/* close the race window with snapshot create/destroy ioctl */
- if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
- down_read(&fs_info->subvol_sem);
- if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
+ if (old_ino == BTRFS_FIRST_FREE_OBJECTID ||
+ new_ino == BTRFS_FIRST_FREE_OBJECTID)
down_read(&fs_info->subvol_sem);
/*
@@ -9790,9 +9789,8 @@ static int btrfs_rename_exchange(struct inode *old_dir,
ret = ret ? ret : ret2;
}
out_notrans:
- if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
- up_read(&fs_info->subvol_sem);
- if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
+ if (new_ino == BTRFS_FIRST_FREE_OBJECTID ||
+ old_ino == BTRFS_FIRST_FREE_OBJECTID)
up_read(&fs_info->subvol_sem);
ASSERT(list_empty(&ctx_root.list));
Currently slab percpu vmstats are flushed twice: during the memcg
offlining and just before freeing the memcg structure. Each time
percpu counters are summed, added to the atomic counterparts and
propagated up by the cgroup tree.
The second flushing is required due to how recursive vmstats are
implemented: counters are batched in percpu variables on a local
level, and once a percpu value is crossing some predefined threshold,
it spills over to atomic values on the local and each ascendant
levels. It means that without flushing some numbers cached in percpu
variables will be dropped on floor each time a cgroup is destroyed.
And with uptime the error on upper levels might become noticeable.
The first flushing aims to make counters on ancestor levels more
precise. Dying cgroups may resume in the dying state for a long time.
After kmem_cache reparenting which is performed during the offlining
slab counters of the dying cgroup don't have any chances to be
updated, because any slab operations will be performed on the parent
level. It means that the inaccuracy caused by percpu batching
will not decrease up to the final destruction of the cgroup.
By the original idea flushing slab counters during the offlining
should minimize the visible inaccuracy of slab counters on the parent
level.
The problem is that percpu counters are not zeroed after the first
flushing. So every cached percpu value is summed twice. It creates
a small error (up to 32 pages per cpu, but usually less) which
accumulates on parent cgroup level. After creating and destroying
of thousands of child cgroups, slab counter on parent level can
be way off the real value.
For now, let's just stop flushing slab counters on memcg offlining.
It can't be done correctly without scheduling a work on each cpu:
reading and zeroing it during css offlining can race with an
asynchronous update, which doesn't expect values to be changed
underneath.
With this change, slab counters on parent level will become eventually
consistent. Once all dying children are gone, values are correct.
And if not, the error is capped by 32 * NR_CPUS pages per dying
cgroup.
It's not perfect, as slab are reparented, so any updates after
the reparenting will happen on the parent level. It means that
if a slab page was allocated, a counter on child level was bumped,
then the page was reparented and freed, the annihilation of positive
and negative counter values will not happen until the child cgroup is
released. It makes slab counters different from others, and it might
want us to implement flushing in a correct form again.
But it's also a question of performance: scheduling a work on each
cpu isn't free, and it's an open question if the benefit of having
more accurate counters is worth it.
We might also consider flushing all counters on offlining, not only
slab counters.
So let's fix the main problem now: make the slab counters eventually
consistent, so at least the error won't grow with uptime (or more
precisely the number of created and destroyed cgroups). And think
about the accuracy of counters separately.
v2: added a note to the changelog, asked by Johannes. Thanks!
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Fixes: bee07b33db78 ("mm: memcontrol: flush percpu slab vmstats on kmem offlining")
Cc: stable(a)vger.kernel.org
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
---
include/linux/mmzone.h | 5 ++---
mm/memcontrol.c | 37 +++++++++----------------------------
2 files changed, 11 insertions(+), 31 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 89d8ff06c9ce..5334ad8fc7bd 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -215,9 +215,8 @@ enum node_stat_item {
NR_INACTIVE_FILE, /* " " " " " */
NR_ACTIVE_FILE, /* " " " " " */
NR_UNEVICTABLE, /* " " " " " */
- NR_SLAB_RECLAIMABLE, /* Please do not reorder this item */
- NR_SLAB_UNRECLAIMABLE, /* and this one without looking at
- * memcg_flush_percpu_vmstats() first. */
+ NR_SLAB_RECLAIMABLE,
+ NR_SLAB_UNRECLAIMABLE,
NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */
NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */
WORKINGSET_NODES,
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 601405b207fb..3165db39827a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3287,49 +3287,34 @@ static u64 mem_cgroup_read_u64(struct cgroup_subsys_state *css,
}
}
-static void memcg_flush_percpu_vmstats(struct mem_cgroup *memcg, bool slab_only)
+static void memcg_flush_percpu_vmstats(struct mem_cgroup *memcg)
{
- unsigned long stat[MEMCG_NR_STAT];
+ unsigned long stat[MEMCG_NR_STAT] = {0};
struct mem_cgroup *mi;
int node, cpu, i;
- int min_idx, max_idx;
-
- if (slab_only) {
- min_idx = NR_SLAB_RECLAIMABLE;
- max_idx = NR_SLAB_UNRECLAIMABLE;
- } else {
- min_idx = 0;
- max_idx = MEMCG_NR_STAT;
- }
-
- for (i = min_idx; i < max_idx; i++)
- stat[i] = 0;
for_each_online_cpu(cpu)
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < MEMCG_NR_STAT; i++)
stat[i] += per_cpu(memcg->vmstats_percpu->stat[i], cpu);
for (mi = memcg; mi; mi = parent_mem_cgroup(mi))
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < MEMCG_NR_STAT; i++)
atomic_long_add(stat[i], &mi->vmstats[i]);
- if (!slab_only)
- max_idx = NR_VM_NODE_STAT_ITEMS;
-
for_each_node(node) {
struct mem_cgroup_per_node *pn = memcg->nodeinfo[node];
struct mem_cgroup_per_node *pi;
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
stat[i] = 0;
for_each_online_cpu(cpu)
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
stat[i] += per_cpu(
pn->lruvec_stat_cpu->count[i], cpu);
for (pi = pn; pi; pi = parent_nodeinfo(pi, node))
- for (i = min_idx; i < max_idx; i++)
+ for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
atomic_long_add(stat[i], &pi->lruvec_stat[i]);
}
}
@@ -3403,13 +3388,9 @@ static void memcg_offline_kmem(struct mem_cgroup *memcg)
parent = root_mem_cgroup;
/*
- * Deactivate and reparent kmem_caches. Then flush percpu
- * slab statistics to have precise values at the parent and
- * all ancestor levels. It's required to keep slab stats
- * accurate after the reparenting of kmem_caches.
+ * Deactivate and reparent kmem_caches.
*/
memcg_deactivate_kmem_caches(memcg, parent);
- memcg_flush_percpu_vmstats(memcg, true);
kmemcg_id = memcg->kmemcg_id;
BUG_ON(kmemcg_id < 0);
@@ -4913,7 +4894,7 @@ static void mem_cgroup_free(struct mem_cgroup *memcg)
* Flush percpu vmstats and vmevents to guarantee the value correctness
* on parent's and all ancestor levels.
*/
- memcg_flush_percpu_vmstats(memcg, false);
+ memcg_flush_percpu_vmstats(memcg);
memcg_flush_percpu_vmevents(memcg);
__mem_cgroup_free(memcg);
}
--
2.17.1
On Sat, Dec 21, 2019 at 09:54:30PM -0700, Shuah Khan wrote:
>On Sat, Dec 21, 2019, 7:46 PM Sasha Levin <sashal(a)kernel.org> wrote:
>
>> This is a note to let you know that I've just added the patch titled
>>
>> selftests: Fix O= and KBUILD_OUTPUT handling for relative paths
>>
>> to the 5.4-stable tree which can be found at:
>>
>> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>>
>> The filename of the patch is:
>> selftests-fix-o-and-kbuild_output-handling-for-relat.patch
>> and it can be found in the queue-5.4 subdirectory.
>>
>> If you, or anyone else, feels it should not be added to the stable tree,
>> please let <stable(a)vger.kernel.org> know about it.
>>
>
>Hi Sasha,
>
>Please don't add this commit. It broke stable workflows.
I'll drop it.
--
Thanks,
Sasha
From: Sven Schnelle <svens(a)linux.ibm.com>
trace_printk schedules work via irq_work_queue(), but doesn't
wait until it was processed. The kprobe_module.tc testcase does:
:;: "Load module again, which means the event1 should be recorded";:
modprobe trace-printk
grep "event1:" trace
so the grep which checks the trace file might run before the irq work
was processed. Fix this by adding a irq_work_sync().
Link: http://lore.kernel.org/linux-trace-devel/20191218074427.96184-3-svens@linux…
Cc: stable(a)vger.kernel.org
Fixes: af2a0750f3749 ("selftests/ftrace: Improve kprobe on module testcase to load/unload module")
Signed-off-by: Sven Schnelle <svens(a)linux.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
samples/trace_printk/trace-printk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/trace_printk/trace-printk.c b/samples/trace_printk/trace-printk.c
index 7affc3b50b61..cfc159580263 100644
--- a/samples/trace_printk/trace-printk.c
+++ b/samples/trace_printk/trace-printk.c
@@ -36,6 +36,7 @@ static int __init trace_printk_init(void)
/* Kick off printing in irq context */
irq_work_queue(&irqwork);
+ irq_work_sync(&irqwork);
trace_printk("This is a %s that will use trace_bprintk()\n",
"static string");
--
2.24.0
From: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
The compare functions of the histogram code would be specific for the size
of the value being compared (byte, short, int, long long). It would
reference the value from the array via the type of the compare, but the
value was stored in a 64 bit number. This is fine for little endian
machines, but for big endian machines, it would end up comparing zeros or
all ones (depending on the sign) for anything but 64 bit numbers.
To fix this, first derference the value as a u64 then convert it to the type
being compared.
Link: http://lkml.kernel.org/r/20191211103557.7bed6928@gandalf.local.home
Cc: stable(a)vger.kernel.org
Fixes: 08d43a5fa063e ("tracing: Add lock-free tracing_map")
Acked-by: Tom Zanussi <zanussi(a)kernel.org>
Reported-by: Sven Schnelle <svens(a)stackframe.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
kernel/trace/tracing_map.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
index 9a1c22310323..9e31bfc818ff 100644
--- a/kernel/trace/tracing_map.c
+++ b/kernel/trace/tracing_map.c
@@ -148,8 +148,8 @@ static int tracing_map_cmp_atomic64(void *val_a, void *val_b)
#define DEFINE_TRACING_MAP_CMP_FN(type) \
static int tracing_map_cmp_##type(void *val_a, void *val_b) \
{ \
- type a = *(type *)val_a; \
- type b = *(type *)val_b; \
+ type a = (type)(*(u64 *)val_a); \
+ type b = (type)(*(u64 *)val_b); \
\
return (a > b) ? 1 : ((a < b) ? -1 : 0); \
}
--
2.24.0
The current code causes a slight glitch on the pinctrl settings when used.
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
the device core will automatically set the default pins. This causes the pins
to be momentarily set to the default and then to the sleep state in
register_m_can_dev(). By adding an optional "enable" state, boards can set the
default pin state to be disabled and avoid the glitch when the switch from
default to sleep first occurs. If the "enable" state is not available
pinctrl_get_select() falls back to using the "default" pinctrl state.
Fixes: c9b3bce18da4 ("can: m_can: select pinctrl state in each suspend/resume function")
Signed-off-by: Marek Vasut <marex(a)denx.de>
Cc: Bich Hemon <bich.hemon(a)st.com>
Cc: Grygorii Strashko <grygorii.strashko(a)ti.com>
Cc: J.D. Schroeder <jay.schroeder(a)garmin.com>
Cc: Marc Kleine-Budde <mkl(a)pengutronix.de>
Cc: Roger Quadros <rogerq(a)ti.com>
Cc: linux-stable <stable(a)vger.kernel.org>
To: linux-can(a)vger.kernel.org
---
NOTE: This is commit 033365191136 ("can: c_can: Fix default pinmux glitch at init")
adapted for m_can driver.
---
drivers/net/can/m_can/m_can.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 02c5795b73936..afb6760b17427 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1243,12 +1243,20 @@ static void m_can_chip_config(struct net_device *dev)
static void m_can_start(struct net_device *dev)
{
struct m_can_classdev *cdev = netdev_priv(dev);
+ struct pinctrl *p;
/* basic m_can configuration */
m_can_chip_config(dev);
cdev->can.state = CAN_STATE_ERROR_ACTIVE;
+ /* Attempt to use "active" if available else use "default" */
+ p = pinctrl_get_select(cdev->dev, "active");
+ if (!IS_ERR(p))
+ pinctrl_put(p);
+ else
+ pinctrl_pm_select_default_state(cdev->dev);
+
m_can_enable_all_interrupts(cdev);
}
--
2.24.0.525.g8f36a354ae
On Sat, Dec 21, 2019 at 11:57:59AM +0000, Mr. FRANQUET wrote:
> Hi,
>
> After reading a blog post[1], I have a great trust interest in seeing you take two upstream commits in stable, so:
>
> 39a8883a2b989d1d21bd8dd99f5557f0c5e89694 (random: add a config option to trust the CPU's hwrng)
> 9b25436662d5fb4c66eb527ead53cab15f596ee0 (random: make CPU trust a boot parameter)
>
> I have just successfully tested this into linux 4.14.159.
If you wish to use this new feature, please just use the 4.19 or newer
kernel, no need to stick to 4.14.y. Remember, stable kernels are for
bugfixes, not new features.
thanks,
greg k-h
I'm announcing the release of the 5.4.6 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/boot/dts/s3c6410-mini6410.dts | 4
arch/arm/boot/dts/s3c6410-smdk6410.dts | 4
arch/arm/mach-tegra/reset-handler.S | 6
arch/xtensa/include/asm/syscall.h | 2
arch/xtensa/mm/kasan_init.c | 4
arch/xtensa/mm/tlb.c | 4
block/bio.c | 4
drivers/dma-buf/sync_file.c | 2
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 57 ++++-
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 2
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 57 +++++
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 73 +++++++
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 4
drivers/gpu/drm/amd/amdgpu/soc15.h | 4
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 3
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +
drivers/gpu/drm/drm_dp_mst_topology.c | 6
drivers/gpu/drm/i915/display/intel_fbc.c | 2
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6
drivers/gpu/drm/meson/meson_venc_cvbs.c | 48 ++--
drivers/gpu/drm/mgag200/mgag200_drv.c | 36 +++
drivers/gpu/drm/mgag200/mgag200_drv.h | 18 +
drivers/gpu/drm/mgag200/mgag200_main.c | 3
drivers/gpu/drm/nouveau/dispnv50/atom.h | 1
drivers/gpu/drm/nouveau/dispnv50/disp.c | 102 ++++++----
drivers/gpu/drm/nouveau/dispnv50/head.c | 5
drivers/gpu/drm/panfrost/panfrost_drv.c | 18 -
drivers/gpu/drm/panfrost/panfrost_gem.c | 15 -
drivers/gpu/drm/radeon/r100.c | 4
drivers/gpu/drm/radeon/r200.c | 4
drivers/md/dm-clone-metadata.c | 136 +++++++++----
drivers/md/dm-clone-metadata.h | 17 +
drivers/md/dm-clone-target.c | 53 ++++-
drivers/md/dm-mpath.c | 37 ---
drivers/md/dm-thin-metadata.c | 29 ++
drivers/md/dm-thin-metadata.h | 7
drivers/md/dm-thin.c | 42 +++-
drivers/md/persistent-data/dm-btree-remove.c | 8
drivers/mmc/core/block.c | 151 +++++----------
drivers/mmc/core/core.c | 12 -
drivers/mmc/core/core.h | 2
drivers/mmc/core/sdio.c | 28 ++
drivers/mmc/core/sdio_bus.c | 9
drivers/pci/controller/pcie-rcar.c | 6
drivers/pci/hotplug/pciehp.h | 2
drivers/pci/hotplug/pciehp_ctrl.c | 6
drivers/pci/hotplug/pciehp_hpc.c | 2
drivers/pci/msi.c | 3
drivers/pci/pci-driver.c | 17 +
drivers/pci/probe.c | 16 +
drivers/pci/quirks.c | 22 +-
drivers/pci/switch/switchtec.c | 2
drivers/rpmsg/qcom_glink_native.c | 53 ++++-
drivers/rpmsg/qcom_glink_smem.c | 2
drivers/scsi/libiscsi.c | 4
drivers/scsi/qla2xxx/qla_attr.c | 1
drivers/scsi/qla2xxx/qla_bsg.c | 2
drivers/scsi/qla2xxx/qla_fw.h | 4
drivers/scsi/qla2xxx/qla_init.c | 2
drivers/scsi/qla2xxx/qla_sup.c | 35 ++-
drivers/scsi/qla2xxx/qla_target.c | 1
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2
drivers/scsi/ufs/cdns-pltfrm.c | 6
drivers/usb/core/hcd.c | 42 ++--
drivers/usb/storage/scsiglue.c | 3
drivers/vfio/pci/vfio_pci_intrs.c | 2
fs/cifs/cifs_debug.c | 5
fs/cifs/cifsglob.h | 1
fs/cifs/connect.c | 53 +++--
fs/cifs/file.c | 7
fs/cifs/smb2misc.c | 59 ++++-
fs/cifs/smb2ops.c | 8
fs/cifs/smb2pdu.c | 16 +
fs/cifs/smb2proto.h | 3
fs/cifs/smbdirect.c | 36 ++-
fs/cifs/transport.c | 17 +
fs/gfs2/file.c | 15 -
fs/gfs2/log.c | 8
fs/gfs2/log.h | 1
fs/gfs2/lops.c | 5
fs/gfs2/trans.c | 2
include/linux/mmc/card.h | 1
include/linux/pm_qos.h | 2
sound/hda/hdac_stream.c | 4
sound/pci/hda/patch_hdmi.c | 2
90 files changed, 1095 insertions(+), 442 deletions(-)
Alex Deucher (3):
drm/radeon: fix r1xx/r2xx register checker for POT textures
drm/amd/display: re-enable wait in pipelock, but add timeout
drm/amd/display: add default clocks if not able to fetch them
Andreas Gruenbacher (2):
block: fix "check bi_size overflow before merge"
gfs2: Multi-block allocations in gfs2_page_mkwrite
Arun Kumar Neelakantam (2):
rpmsg: glink: Fix reuse intents memory leak issue
rpmsg: glink: Fix use after free in open_ack TIMEOUT case
Bart Van Assche (1):
scsi: iscsi: Fix a potential deadlock in the timeout handler
Bjorn Andersson (2):
rpmsg: glink: Don't send pending rx_done during remove
rpmsg: glink: Free pending deferred work on remove
Bob Peterson (1):
gfs2: fix glock reference problem in gfs2_trans_remove_revoke
Boris Brezillon (3):
drm/panfrost: Fix a race in panfrost_ioctl_madvise()
drm/panfrost: Fix a BO leak in panfrost_ioctl_mmap_bo()
drm/panfrost: Fix a race in panfrost_gem_free_object()
Chaotian Jing (2):
mmc: block: Make card_busy_detect() a bit more generic
mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response
Chris Lew (3):
rpmsg: glink: Set tail pointer to 0 at end of FIFO
rpmsg: glink: Put an extra reference during cleanup
rpmsg: glink: Fix rpmsg_register_device err handling
Dexuan Cui (1):
PCI/PM: Always return devices to D0 when thawing
Dmitry Osipenko (1):
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
Fredrik Noring (1):
USB: Fix incorrect DMA allocations for local memory pool drivers
George Cherian (1):
PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3
Greg Kroah-Hartman (1):
Linux 5.4.6
Himanshu Madhani (1):
scsi: qla2xxx: Correctly retrieve and interpret active flash region
Hou Tao (1):
dm btree: increase rebalance threshold in __rebalance2()
Jian-Hong Pan (1):
PCI/MSI: Fix incorrect MSI-X masking on resume
Jiang Yi (1):
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
Leonard Crestez (1):
PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX
Lihua Yao (1):
ARM: dts: s3c64xx: Fix init order of clock providers
Logan Gunthorpe (1):
PCI/switchtec: Read all 64 bits of part_event_bitmap
Long Li (6):
cifs: smbd: Return -EAGAIN when transport is reconnecting
cifs: smbd: Only queue work for error recovery on memory registration
cifs: smbd: Add messages on RDMA session destroy and reconnection
cifs: smbd: Return -EINVAL when the number of iovs exceeds SMBDIRECT_MAX_SGE
cifs: smbd: Return -ECONNABORTED when trasnport is not in connected state
cifs: Don't display RDMA transport on reconnect
Lukas Wunner (1):
PCI: pciehp: Avoid returning prematurely from sysfs requests
Lyude Paul (3):
drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN
drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom
drm/nouveau/kms/nv50-: Limit MST BPC to 8
Martin Blumenstingl (1):
drm: meson: venc: cvbs: fix CVBS mode matching
Max Filippov (3):
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map
xtensa: fix TLB sanity checker
xtensa: fix syscall_set_return_value
Michael Hernandez (2):
scsi: qla2xxx: Added support for MPI and PEP regions for ISP28XX
scsi: qla2xxx: Fix incorrect SFUB length used for Secure Flash Update MB Cmd
Mike Snitzer (1):
dm mpath: remove harmful bio-based optimization
Navid Emamdoost (1):
dma-buf: Fix memory leak in sync_file_merge()
Nikos Tsironis (5):
dm clone metadata: Track exact changes per transaction
dm clone metadata: Use a two phase commit
dm clone: Flush destination device before committing metadata
dm thin metadata: Add support for a pre-commit callback
dm thin: Flush data device before committing metadata
Paulo Alcantara (SUSE) (1):
cifs: Fix retrieval of DFS referrals in cifs_mount()
Pavel Shilovsky (4):
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
CIFS: Close open handle after interrupted close
CIFS: Do not miss cancelled OPEN responses
CIFS: Fix NULL pointer dereference in mid callback
Roman Bolshakov (3):
scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd
scsi: qla2xxx: Initialize free_work before flushing it
scsi: qla2xxx: Change discovery state before PLOGI
Steffen Liebergeld (1):
PCI: Fix Intel ACS quirk UPDCR register address
Subbaraya Sundeep (1):
PCI: Do not use bus number zero from EA capability
Takashi Iwai (1):
ALSA: hda: Fix regression by strip mask fix
Thomas Zimmermann (4):
drm/mgag200: Extract device type from flags
drm/mgag200: Store flags from PCI driver data in device structure
drm/mgag200: Add workaround for HW that does not support 'startadd'
drm/mgag200: Flag all G200 SE A machines as broken wrt <startadd>
Ulf Hansson (2):
mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan()
mmc: core: Re-work HW reset for SDIO cards
Ville Syrjälä (1):
drm/i915/fbc: Disable fbc by default on all glk+
Wayne Lin (1):
drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
Xiaojie Yuan (2):
drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
drm/amdgpu/gfx10: re-init clear state buffer after gpu reset
Yoshihiro Shimoda (1):
PCI: rcar: Fix missing MACCTLR register setting in initialization sequence
Zhenyu Wang (1):
drm/i915/gvt: Fix cmd length check for MI_ATOMIC
changzhu (4):
drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub
drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10
drm/amdgpu: avoid using invalidate semaphore for picasso
drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9
sheebab (1):
scsi: ufs: Disable autohibern8 feature in Cadence UFS
This is the start of the stable review cycle for the 5.4.6 release.
There are 80 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 21 Dec 2019 18:24:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.6-rc1.…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.6-rc1
changzhu <Changfeng.Zhu(a)amd.com>
drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9
changzhu <Changfeng.Zhu(a)amd.com>
drm/amdgpu: avoid using invalidate semaphore for picasso
Zhenyu Wang <zhenyuw(a)linux.intel.com>
drm/i915/gvt: Fix cmd length check for MI_ATOMIC
Xiaojie Yuan <xiaojie.yuan(a)amd.com>
drm/amdgpu/gfx10: re-init clear state buffer after gpu reset
Xiaojie Yuan <xiaojie.yuan(a)amd.com>
drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
changzhu <Changfeng.Zhu(a)amd.com>
drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10
changzhu <Changfeng.Zhu(a)amd.com>
drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub
Alex Deucher <alexander.deucher(a)amd.com>
drm/amd/display: add default clocks if not able to fetch them
Alex Deucher <alexander.deucher(a)amd.com>
drm/amd/display: re-enable wait in pipelock, but add timeout
Wayne Lin <Wayne.Lin(a)amd.com>
drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
Alex Deucher <alexander.deucher(a)amd.com>
drm/radeon: fix r1xx/r2xx register checker for POT textures
Ville Syrjälä <ville.syrjala(a)linux.intel.com>
drm/i915/fbc: Disable fbc by default on all glk+
Lyude Paul <lyude(a)redhat.com>
drm/nouveau/kms/nv50-: Limit MST BPC to 8
Lyude Paul <lyude(a)redhat.com>
drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom
Lyude Paul <lyude(a)redhat.com>
drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN
Michael Hernandez <mhernandez(a)marvell.com>
scsi: qla2xxx: Fix incorrect SFUB length used for Secure Flash Update MB Cmd
Himanshu Madhani <hmadhani(a)marvell.com>
scsi: qla2xxx: Correctly retrieve and interpret active flash region
Roman Bolshakov <r.bolshakov(a)yadro.com>
scsi: qla2xxx: Change discovery state before PLOGI
Michael Hernandez <mhernandez(a)marvell.com>
scsi: qla2xxx: Added support for MPI and PEP regions for ISP28XX
Roman Bolshakov <r.bolshakov(a)yadro.com>
scsi: qla2xxx: Initialize free_work before flushing it
Roman Bolshakov <r.bolshakov(a)yadro.com>
scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd
Bart Van Assche <bvanassche(a)acm.org>
scsi: iscsi: Fix a potential deadlock in the timeout handler
sheebab <sheebab(a)cadence.com>
scsi: ufs: Disable autohibern8 feature in Cadence UFS
Nikos Tsironis <ntsironis(a)arrikto.com>
dm thin: Flush data device before committing metadata
Nikos Tsironis <ntsironis(a)arrikto.com>
dm thin metadata: Add support for a pre-commit callback
Nikos Tsironis <ntsironis(a)arrikto.com>
dm clone: Flush destination device before committing metadata
Nikos Tsironis <ntsironis(a)arrikto.com>
dm clone metadata: Use a two phase commit
Nikos Tsironis <ntsironis(a)arrikto.com>
dm clone metadata: Track exact changes per transaction
Hou Tao <houtao1(a)huawei.com>
dm btree: increase rebalance threshold in __rebalance2()
Mike Snitzer <snitzer(a)redhat.com>
dm mpath: remove harmful bio-based optimization
Martin Blumenstingl <martin.blumenstingl(a)googlemail.com>
drm: meson: venc: cvbs: fix CVBS mode matching
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/mgag200: Flag all G200 SE A machines as broken wrt <startadd>
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/mgag200: Add workaround for HW that does not support 'startadd'
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/mgag200: Store flags from PCI driver data in device structure
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/mgag200: Extract device type from flags
Boris Brezillon <boris.brezillon(a)collabora.com>
drm/panfrost: Fix a race in panfrost_gem_free_object()
Boris Brezillon <boris.brezillon(a)collabora.com>
drm/panfrost: Fix a BO leak in panfrost_ioctl_mmap_bo()
Boris Brezillon <boris.brezillon(a)collabora.com>
drm/panfrost: Fix a race in panfrost_ioctl_madvise()
Navid Emamdoost <navid.emamdoost(a)gmail.com>
dma-buf: Fix memory leak in sync_file_merge()
Jiang Yi <giangyi(a)amazon.com>
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
Dmitry Osipenko <digetx(a)gmail.com>
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
Lihua Yao <ylhuajnu(a)outlook.com>
ARM: dts: s3c64xx: Fix init order of clock providers
Paulo Alcantara (SUSE) <pc(a)cjr.nz>
cifs: Fix retrieval of DFS referrals in cifs_mount()
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix NULL pointer dereference in mid callback
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not miss cancelled OPEN responses
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Close open handle after interrupted close
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
Long Li <longli(a)microsoft.com>
cifs: Don't display RDMA transport on reconnect
Long Li <longli(a)microsoft.com>
cifs: smbd: Return -ECONNABORTED when trasnport is not in connected state
Long Li <longli(a)microsoft.com>
cifs: smbd: Return -EINVAL when the number of iovs exceeds SMBDIRECT_MAX_SGE
Long Li <longli(a)microsoft.com>
cifs: smbd: Add messages on RDMA session destroy and reconnection
Long Li <longli(a)microsoft.com>
cifs: smbd: Only queue work for error recovery on memory registration
Long Li <longli(a)microsoft.com>
cifs: smbd: Return -EAGAIN when transport is reconnecting
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Free pending deferred work on remove
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Don't send pending rx_done during remove
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Fix rpmsg_register_device err handling
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Put an extra reference during cleanup
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix use after free in open_ack TIMEOUT case
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix reuse intents memory leak issue
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Set tail pointer to 0 at end of FIFO
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: fix syscall_set_return_value
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: fix TLB sanity checker
Bob Peterson <rpeterso(a)redhat.com>
gfs2: fix glock reference problem in gfs2_trans_remove_revoke
Andreas Gruenbacher <agruenba(a)redhat.com>
gfs2: Multi-block allocations in gfs2_page_mkwrite
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map
Andreas Gruenbacher <agruenba(a)redhat.com>
block: fix "check bi_size overflow before merge"
Leonard Crestez <leonard.crestez(a)nxp.com>
PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX
George Cherian <george.cherian(a)marvell.com>
PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3
Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
PCI: rcar: Fix missing MACCTLR register setting in initialization sequence
Subbaraya Sundeep <sbhatta(a)marvell.com>
PCI: Do not use bus number zero from EA capability
Jian-Hong Pan <jian-hong(a)endlessm.com>
PCI/MSI: Fix incorrect MSI-X masking on resume
Steffen Liebergeld <steffen.liebergeld(a)kernkonzept.com>
PCI: Fix Intel ACS quirk UPDCR register address
Lukas Wunner <lukas(a)wunner.de>
PCI: pciehp: Avoid returning prematurely from sysfs requests
Dexuan Cui <decui(a)microsoft.com>
PCI/PM: Always return devices to D0 when thawing
Logan Gunthorpe <logang(a)deltatee.com>
PCI/switchtec: Read all 64 bits of part_event_bitmap
Ulf Hansson <ulf.hansson(a)linaro.org>
mmc: core: Re-work HW reset for SDIO cards
Ulf Hansson <ulf.hansson(a)linaro.org>
mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan()
Chaotian Jing <chaotian.jing(a)mediatek.com>
mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response
Chaotian Jing <chaotian.jing(a)mediatek.com>
mmc: block: Make card_busy_detect() a bit more generic
Fredrik Noring <noring(a)nocrew.org>
USB: Fix incorrect DMA allocations for local memory pool drivers
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/s3c6410-mini6410.dts | 4 +
arch/arm/boot/dts/s3c6410-smdk6410.dts | 4 +
arch/arm/mach-tegra/reset-handler.S | 6 +-
arch/xtensa/include/asm/syscall.h | 2 +-
arch/xtensa/mm/kasan_init.c | 4 +-
arch/xtensa/mm/tlb.c | 4 +-
block/bio.c | 4 +-
drivers/dma-buf/sync_file.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 57 ++++++--
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 2 +
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 57 ++++++++
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 73 ++++++++++
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 +
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 4 +
drivers/gpu/drm/amd/amdgpu/soc15.h | 4 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 3 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++
drivers/gpu/drm/drm_dp_mst_topology.c | 6 +-
drivers/gpu/drm/i915/display/intel_fbc.c | 2 +-
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 +-
drivers/gpu/drm/meson/meson_venc_cvbs.c | 48 ++++---
drivers/gpu/drm/mgag200/mgag200_drv.c | 36 ++++-
drivers/gpu/drm/mgag200/mgag200_drv.h | 18 +++
drivers/gpu/drm/mgag200/mgag200_main.c | 3 +-
drivers/gpu/drm/nouveau/dispnv50/atom.h | 1 +
drivers/gpu/drm/nouveau/dispnv50/disp.c | 102 ++++++++------
drivers/gpu/drm/nouveau/dispnv50/head.c | 5 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 18 +--
drivers/gpu/drm/panfrost/panfrost_gem.c | 15 +-
drivers/gpu/drm/radeon/r100.c | 4 +-
drivers/gpu/drm/radeon/r200.c | 4 +-
drivers/md/dm-clone-metadata.c | 136 ++++++++++++++-----
drivers/md/dm-clone-metadata.h | 17 +++
drivers/md/dm-clone-target.c | 53 +++++++-
drivers/md/dm-mpath.c | 37 +----
drivers/md/dm-thin-metadata.c | 29 ++++
drivers/md/dm-thin-metadata.h | 7 +
drivers/md/dm-thin.c | 42 +++++-
drivers/md/persistent-data/dm-btree-remove.c | 8 +-
drivers/mmc/core/block.c | 151 ++++++++-------------
drivers/mmc/core/core.c | 12 +-
drivers/mmc/core/core.h | 2 +
drivers/mmc/core/sdio.c | 28 +++-
drivers/mmc/core/sdio_bus.c | 9 +-
drivers/pci/controller/pcie-rcar.c | 6 +
drivers/pci/hotplug/pciehp.h | 2 +
drivers/pci/hotplug/pciehp_ctrl.c | 6 +-
drivers/pci/hotplug/pciehp_hpc.c | 2 +
drivers/pci/msi.c | 3 +-
drivers/pci/pci-driver.c | 17 ++-
drivers/pci/probe.c | 16 ++-
drivers/pci/quirks.c | 22 +--
drivers/pci/switch/switchtec.c | 2 +-
drivers/rpmsg/qcom_glink_native.c | 53 ++++++--
drivers/rpmsg/qcom_glink_smem.c | 2 +-
drivers/scsi/libiscsi.c | 4 +-
drivers/scsi/qla2xxx/qla_attr.c | 1 +
drivers/scsi/qla2xxx/qla_bsg.c | 2 +-
drivers/scsi/qla2xxx/qla_fw.h | 4 +
drivers/scsi/qla2xxx/qla_init.c | 2 +
drivers/scsi/qla2xxx/qla_sup.c | 35 +++--
drivers/scsi/qla2xxx/qla_target.c | 1 -
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +
drivers/scsi/ufs/cdns-pltfrm.c | 6 +
drivers/usb/core/hcd.c | 42 +++---
drivers/usb/storage/scsiglue.c | 3 +-
drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
fs/cifs/cifs_debug.c | 5 +
fs/cifs/cifsglob.h | 1 +
fs/cifs/connect.c | 53 +++++---
fs/cifs/file.c | 7 +
fs/cifs/smb2misc.c | 59 ++++++--
fs/cifs/smb2ops.c | 8 +-
fs/cifs/smb2pdu.c | 16 ++-
fs/cifs/smb2proto.h | 3 +
fs/cifs/smbdirect.c | 36 +++--
fs/cifs/transport.c | 17 ++-
fs/gfs2/file.c | 15 +-
fs/gfs2/log.c | 8 ++
fs/gfs2/log.h | 1 +
fs/gfs2/lops.c | 5 +-
fs/gfs2/trans.c | 2 +
include/linux/mmc/card.h | 1 +
include/linux/pm_qos.h | 2 +-
88 files changed, 1093 insertions(+), 440 deletions(-)
This is the start of the stable review cycle for the 4.19.91 release.
There are 47 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 21 Dec 2019 18:24:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.91-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.91-rc1
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: fix USB3 device initiated resume race with roothub autosuspend
Alex Deucher <alexander.deucher(a)amd.com>
drm/radeon: fix r1xx/r2xx register checker for POT textures
Roman Bolshakov <r.bolshakov(a)yadro.com>
scsi: qla2xxx: Change discovery state before PLOGI
Bart Van Assche <bvanassche(a)acm.org>
scsi: iscsi: Fix a potential deadlock in the timeout handler
Hou Tao <houtao1(a)huawei.com>
dm btree: increase rebalance threshold in __rebalance2()
Mike Snitzer <snitzer(a)redhat.com>
dm mpath: remove harmful bio-based optimization
Martin Blumenstingl <martin.blumenstingl(a)googlemail.com>
drm: meson: venc: cvbs: fix CVBS mode matching
Navid Emamdoost <navid.emamdoost(a)gmail.com>
dma-buf: Fix memory leak in sync_file_merge()
Jiang Yi <giangyi(a)amazon.com>
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
Dmitry Osipenko <digetx(a)gmail.com>
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
Lihua Yao <ylhuajnu(a)outlook.com>
ARM: dts: s3c64xx: Fix init order of clock providers
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Close open handle after interrupted close
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
Long Li <longli(a)microsoft.com>
cifs: Don't display RDMA transport on reconnect
Long Li <longli(a)microsoft.com>
cifs: smbd: Return -EINVAL when the number of iovs exceeds SMBDIRECT_MAX_SGE
Long Li <longli(a)microsoft.com>
cifs: smbd: Add messages on RDMA session destroy and reconnection
Long Li <longli(a)microsoft.com>
cifs: smbd: Return -EAGAIN when transport is reconnecting
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Free pending deferred work on remove
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Don't send pending rx_done during remove
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Fix rpmsg_register_device err handling
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Put an extra reference during cleanup
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix use after free in open_ack TIMEOUT case
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix reuse intents memory leak issue
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Set tail pointer to 0 at end of FIFO
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: fix TLB sanity checker
George Cherian <george.cherian(a)marvell.com>
PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3
Jian-Hong Pan <jian-hong(a)endlessm.com>
PCI/MSI: Fix incorrect MSI-X masking on resume
Steffen Liebergeld <steffen.liebergeld(a)kernkonzept.com>
PCI: Fix Intel ACS quirk UPDCR register address
Lukas Wunner <lukas(a)wunner.de>
PCI: pciehp: Avoid returning prematurely from sysfs requests
Dexuan Cui <decui(a)microsoft.com>
PCI/PM: Always return devices to D0 when thawing
Chaotian Jing <chaotian.jing(a)mediatek.com>
mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response
Chaotian Jing <chaotian.jing(a)mediatek.com>
mmc: block: Make card_busy_detect() a bit more generic
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "arm64: preempt: Fix big-endian when checking preempt count in assembly"
Guillaume Nault <gnault(a)redhat.com>
tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
Guillaume Nault <gnault(a)redhat.com>
tcp: tighten acceptance of ACKs not matching a child socket
Guillaume Nault <gnault(a)redhat.com>
tcp: fix rejected syncookies due to stale timestamps
Huy Nguyen <huyn(a)mellanox.com>
net/mlx5e: Query global pause state before setting prio2buffer
Taehee Yoo <ap420073(a)gmail.com>
tipc: fix ordering of tipc module init and exit routine
Eric Dumazet <edumazet(a)google.com>
tcp: md5: fix potential overestimation of TCP option space
Aaron Conole <aconole(a)redhat.com>
openvswitch: support asymmetric conntrack
Mian Yousaf Kaukab <ykaukab(a)suse.de>
net: thunderx: start phy before starting autonegotiation
Dust Li <dust.li(a)linux.alibaba.com>
net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues
Grygorii Strashko <grygorii.strashko(a)ti.com>
net: ethernet: ti: cpsw: fix extra rx interrupt
Alexander Lobakin <alobakin(a)dlink.ru>
net: dsa: fix flow dissection on Tx path
Nikolay Aleksandrov <nikolay(a)cumulusnetworks.com>
net: bridge: deny dev_set_mac_address() when unregistering
Vladyslav Tarasiuk <vladyslavt(a)mellanox.com>
mqprio: Fix out-of-bounds access in mqprio_dump
Eric Dumazet <edumazet(a)google.com>
inet: protect against too small mtu values.
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/s3c6410-mini6410.dts | 4 +
arch/arm/boot/dts/s3c6410-smdk6410.dts | 4 +
arch/arm/mach-tegra/reset-handler.S | 6 +-
arch/arm64/include/asm/assembler.h | 8 +-
arch/arm64/kernel/entry.S | 6 +-
arch/xtensa/mm/tlb.c | 4 +-
drivers/dma-buf/sync_file.c | 2 +-
drivers/gpu/drm/meson/meson_venc_cvbs.c | 48 ++++---
drivers/gpu/drm/radeon/r100.c | 4 +-
drivers/gpu/drm/radeon/r200.c | 4 +-
drivers/md/dm-mpath.c | 37 +----
drivers/md/persistent-data/dm-btree-remove.c | 8 +-
drivers/mmc/core/block.c | 151 ++++++++-------------
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +-
.../ethernet/mellanox/mlx5/core/en/port_buffer.c | 27 +++-
drivers/net/ethernet/ti/cpsw.c | 2 +-
drivers/pci/hotplug/pciehp.h | 2 +
drivers/pci/hotplug/pciehp_ctrl.c | 6 +-
drivers/pci/hotplug/pciehp_hpc.c | 2 +
drivers/pci/msi.c | 2 +-
drivers/pci/pci-driver.c | 17 ++-
drivers/pci/quirks.c | 22 +--
drivers/rpmsg/qcom_glink_native.c | 53 ++++++--
drivers/rpmsg/qcom_glink_smem.c | 2 +-
drivers/scsi/libiscsi.c | 4 +-
drivers/scsi/qla2xxx/qla_init.c | 1 +
drivers/usb/host/xhci-hub.c | 8 ++
drivers/usb/host/xhci-ring.c | 3 +-
drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
fs/cifs/cifs_debug.c | 5 +
fs/cifs/file.c | 7 +
fs/cifs/smb2misc.c | 59 ++++++--
fs/cifs/smb2pdu.c | 16 ++-
fs/cifs/smb2proto.h | 3 +
fs/cifs/smbdirect.c | 8 +-
fs/cifs/transport.c | 7 +-
include/linux/netdevice.h | 5 +
include/linux/time.h | 13 ++
include/net/ip.h | 5 +
include/net/tcp.h | 27 ++--
net/bridge/br_device.c | 6 +
net/core/dev.c | 3 +-
net/core/flow_dissector.c | 5 +-
net/ipv4/devinet.c | 5 -
net/ipv4/ip_output.c | 13 +-
net/ipv4/tcp_output.c | 5 +-
net/openvswitch/conntrack.c | 11 ++
net/sched/sch_mq.c | 1 +
net/sched/sch_mqprio.c | 3 +-
net/tipc/core.c | 29 ++--
51 files changed, 416 insertions(+), 265 deletions(-)
This is the start of the stable review cycle for the 4.14.160 release.
There are 36 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 21 Dec 2019 18:24:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.160-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.160-rc1
Aaro Koskinen <aaro.koskinen(a)nokia.com>
net: stmmac: don't stop NAPI processing when dropping a packet
Aaro Koskinen <aaro.koskinen(a)nokia.com>
net: stmmac: use correct DMA buffer size in the RX descriptor
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: fix USB3 device initiated resume race with roothub autosuspend
Alex Deucher <alexander.deucher(a)amd.com>
drm/radeon: fix r1xx/r2xx register checker for POT textures
Bart Van Assche <bvanassche(a)acm.org>
scsi: iscsi: Fix a potential deadlock in the timeout handler
Hou Tao <houtao1(a)huawei.com>
dm btree: increase rebalance threshold in __rebalance2()
Navid Emamdoost <navid.emamdoost(a)gmail.com>
dma-buf: Fix memory leak in sync_file_merge()
Jiang Yi <giangyi(a)amazon.com>
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
Dmitry Osipenko <digetx(a)gmail.com>
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
Lihua Yao <ylhuajnu(a)outlook.com>
ARM: dts: s3c64xx: Fix init order of clock providers
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Free pending deferred work on remove
Bjorn Andersson <bjorn.andersson(a)linaro.org>
rpmsg: glink: Don't send pending rx_done during remove
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Fix rpmsg_register_device err handling
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Put an extra reference during cleanup
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix use after free in open_ack TIMEOUT case
Arun Kumar Neelakantam <aneela(a)codeaurora.org>
rpmsg: glink: Fix reuse intents memory leak issue
Chris Lew <clew(a)codeaurora.org>
rpmsg: glink: Set tail pointer to 0 at end of FIFO
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: fix TLB sanity checker
George Cherian <george.cherian(a)marvell.com>
PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3
Jian-Hong Pan <jian-hong(a)endlessm.com>
PCI/MSI: Fix incorrect MSI-X masking on resume
Steffen Liebergeld <steffen.liebergeld(a)kernkonzept.com>
PCI: Fix Intel ACS quirk UPDCR register address
Dexuan Cui <decui(a)microsoft.com>
PCI/PM: Always return devices to D0 when thawing
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "regulator: Defer init completion for a while after late_initcall"
Ivan Bornyakov <brnkv.i1(a)gmail.com>
nvme: host: core: fix precedence of ternary operator
Eric Dumazet <edumazet(a)google.com>
inet: protect against too small mtu values.
Guillaume Nault <gnault(a)redhat.com>
tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
Guillaume Nault <gnault(a)redhat.com>
tcp: tighten acceptance of ACKs not matching a child socket
Guillaume Nault <gnault(a)redhat.com>
tcp: fix rejected syncookies due to stale timestamps
Taehee Yoo <ap420073(a)gmail.com>
tipc: fix ordering of tipc module init and exit routine
Eric Dumazet <edumazet(a)google.com>
tcp: md5: fix potential overestimation of TCP option space
Aaron Conole <aconole(a)redhat.com>
openvswitch: support asymmetric conntrack
Mian Yousaf Kaukab <ykaukab(a)suse.de>
net: thunderx: start phy before starting autonegotiation
Grygorii Strashko <grygorii.strashko(a)ti.com>
net: ethernet: ti: cpsw: fix extra rx interrupt
Alexander Lobakin <alobakin(a)dlink.ru>
net: dsa: fix flow dissection on Tx path
Nikolay Aleksandrov <nikolay(a)cumulusnetworks.com>
net: bridge: deny dev_set_mac_address() when unregistering
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/s3c6410-mini6410.dts | 4 ++
arch/arm/boot/dts/s3c6410-smdk6410.dts | 4 ++
arch/arm/mach-tegra/reset-handler.S | 6 +--
arch/xtensa/mm/tlb.c | 4 +-
drivers/dma-buf/sync_file.c | 2 +-
drivers/gpu/drm/radeon/r100.c | 4 +-
drivers/gpu/drm/radeon/r200.c | 4 +-
drivers/md/persistent-data/dm-btree-remove.c | 8 +++-
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/common.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/descs_com.h | 22 +++++----
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 10 ++--
drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 10 ++--
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++++----
drivers/net/ethernet/ti/cpsw.c | 2 +-
drivers/nvme/host/core.c | 4 +-
drivers/pci/msi.c | 2 +-
drivers/pci/pci-driver.c | 17 ++++---
drivers/pci/quirks.c | 22 +++++----
drivers/regulator/core.c | 42 +++++------------
drivers/rpmsg/qcom_glink_native.c | 53 +++++++++++++++++-----
drivers/rpmsg/qcom_glink_smem.c | 2 +-
drivers/scsi/libiscsi.c | 4 +-
drivers/usb/host/xhci-hub.c | 8 ++++
drivers/usb/host/xhci-ring.c | 6 +--
drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
fs/cifs/file.c | 7 +++
include/linux/netdevice.h | 5 ++
include/linux/time.h | 13 ++++++
include/net/ip.h | 5 ++
include/net/tcp.h | 18 ++++++--
net/bridge/br_device.c | 6 +++
net/core/dev.c | 3 +-
net/core/flow_dissector.c | 5 +-
net/ipv4/devinet.c | 5 --
net/ipv4/ip_output.c | 14 ++++--
net/ipv4/tcp_output.c | 5 +-
net/openvswitch/conntrack.c | 11 +++++
net/tipc/core.c | 29 ++++++------
41 files changed, 257 insertions(+), 143 deletions(-)
Amend the endpoint-descriptor sanity checks to detect all duplicate
endpoint addresses in a configuration.
Commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint
addresses") added a check for duplicate endpoint addresses within a
single alternate setting, but did not look for duplicate addresses in
other interfaces.
The current check would also not detect all duplicate addresses when one
endpoint is as a (bi-directional) control endpoint.
This specifically avoids overwriting the endpoint entries in struct
usb_device when enabling a duplicate endpoint, something which could
potentially lead to crashes or leaks, for example, when endpoints are
later disabled.
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
---
Exploiting this to trigger a crash probably requires a lot more
malicious intent than the syzbot fuzzer currently possesses, but I think
we need to plug this nonetheless.
Johan
drivers/usb/core/config.c | 70 ++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 5f40117e68e7..21291950cc97 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -203,9 +203,58 @@ static const unsigned short super_speed_maxpacket_maxes[4] = {
[USB_ENDPOINT_XFER_INT] = 1024,
};
-static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
- int asnum, struct usb_host_interface *ifp, int num_ep,
- unsigned char *buffer, int size)
+static bool endpoint_is_duplicate(struct usb_endpoint_descriptor *e1,
+ struct usb_endpoint_descriptor *e2)
+{
+ if (e1->bEndpointAddress == e2->bEndpointAddress)
+ return true;
+
+ if (usb_endpoint_xfer_control(e1) || usb_endpoint_xfer_control(e2)) {
+ if (usb_endpoint_num(e1) == usb_endpoint_num(e2))
+ return true;
+ }
+
+ return false;
+}
+
+/*
+ * Check for duplicate endpoint addresses in other interfaces and in the
+ * altsetting currently being parsed.
+ */
+static bool config_endpoint_is_duplicate(struct usb_host_config *config,
+ int inum, int asnum, struct usb_endpoint_descriptor *d)
+{
+ struct usb_endpoint_descriptor *epd;
+ struct usb_interface_cache *intfc;
+ struct usb_host_interface *alt;
+ int i, j, k;
+
+ for (i = 0; i < config->desc.bNumInterfaces; ++i) {
+ intfc = config->intf_cache[i];
+
+ for (j = 0; j < intfc->num_altsetting; ++j) {
+ alt = &intfc->altsetting[j];
+
+ if (alt->desc.bInterfaceNumber == inum &&
+ alt->desc.bAlternateSetting != asnum)
+ continue;
+
+ for (k = 0; k < alt->desc.bNumEndpoints; ++k) {
+ epd = &alt->endpoint[k].desc;
+
+ if (endpoint_is_duplicate(epd, d))
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+static int usb_parse_endpoint(struct device *ddev, int cfgno,
+ struct usb_host_config *config, int inum, int asnum,
+ struct usb_host_interface *ifp, int num_ep,
+ unsigned char *buffer, int size)
{
unsigned char *buffer0 = buffer;
struct usb_endpoint_descriptor *d;
@@ -242,13 +291,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
goto skip_to_next_endpoint_or_interface_descriptor;
/* Check for duplicate endpoint addresses */
- for (i = 0; i < ifp->desc.bNumEndpoints; ++i) {
- if (ifp->endpoint[i].desc.bEndpointAddress ==
- d->bEndpointAddress) {
- dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
- cfgno, inum, asnum, d->bEndpointAddress);
- goto skip_to_next_endpoint_or_interface_descriptor;
- }
+ if (config_endpoint_is_duplicate(config, inum, asnum, d)) {
+ dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
+ cfgno, inum, asnum, d->bEndpointAddress);
+ goto skip_to_next_endpoint_or_interface_descriptor;
}
endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints];
@@ -522,8 +568,8 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
if (((struct usb_descriptor_header *) buffer)->bDescriptorType
== USB_DT_INTERFACE)
break;
- retval = usb_parse_endpoint(ddev, cfgno, inum, asnum, alt,
- num_ep, buffer, size);
+ retval = usb_parse_endpoint(ddev, cfgno, config, inum, asnum,
+ alt, num_ep, buffer, size);
if (retval < 0)
return retval;
++n;
--
2.24.1
Hi,
Here is a repost of a small set of rseq fixes which was initially posted
in September 2019. It now targets kernel 5.5. Those should be backported
to stable kernels >= 4.18.
Thanks,
Mathieu
Mathieu Desnoyers (3):
rseq: Fix: Reject unknown flags on rseq unregister
rseq: Fix: Unregister rseq for clone CLONE_VM
rseq/selftests: Fix: Namespace gettid() for compatibility with glibc
2.30
include/linux/sched.h | 4 ++--
kernel/rseq.c | 2 ++
tools/testing/selftests/rseq/param_test.c | 18 ++++++++++--------
3 files changed, 14 insertions(+), 10 deletions(-)
--
2.17.1
From: Leonard Crestez <leonard.crestez(a)nxp.com>
[ Upstream commit 42a6b25e67df6ee6675e8d1eaf18065bd73328ba ]
Right now devfreq_dev_release will print a warning and abort the rest of
the cleanup if the devfreq instance is not part of the global
devfreq_list. But this is a valid scenario, for example it can happen if
the governor can't be found or on any other init error that happens
after device_register.
Initialize devfreq->node to an empty list head in devfreq_add_device so
that list_del becomes a safe noop inside devfreq_dev_release and we can
continue the rest of the cleanup.
Signed-off-by: Leonard Crestez <leonard.crestez(a)nxp.com>
Reviewed-by: Matthias Kaehlcke <mka(a)chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/devfreq/devfreq.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 4f6fc1cfd7da2..f01f7434df8eb 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -396,11 +396,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
static void _remove_devfreq(struct devfreq *devfreq)
{
mutex_lock(&devfreq_list_lock);
- if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
- mutex_unlock(&devfreq_list_lock);
- dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
- return;
- }
list_del(&devfreq->node);
mutex_unlock(&devfreq_list_lock);
@@ -472,6 +467,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->dev.parent = dev;
devfreq->dev.class = devfreq_class;
devfreq->dev.release = devfreq_dev_release;
+ INIT_LIST_HEAD(&devfreq->node);
devfreq->profile = profile;
strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
devfreq->previous_freq = profile->initial_freq;
--
2.20.1
From: Leonard Crestez <leonard.crestez(a)nxp.com>
[ Upstream commit 42a6b25e67df6ee6675e8d1eaf18065bd73328ba ]
Right now devfreq_dev_release will print a warning and abort the rest of
the cleanup if the devfreq instance is not part of the global
devfreq_list. But this is a valid scenario, for example it can happen if
the governor can't be found or on any other init error that happens
after device_register.
Initialize devfreq->node to an empty list head in devfreq_add_device so
that list_del becomes a safe noop inside devfreq_dev_release and we can
continue the rest of the cleanup.
Signed-off-by: Leonard Crestez <leonard.crestez(a)nxp.com>
Reviewed-by: Matthias Kaehlcke <mka(a)chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/devfreq/devfreq.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index db70cee71caa1..dc103edc9fc17 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -481,11 +481,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
static void _remove_devfreq(struct devfreq *devfreq)
{
mutex_lock(&devfreq_list_lock);
- if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
- mutex_unlock(&devfreq_list_lock);
- dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
- return;
- }
list_del(&devfreq->node);
mutex_unlock(&devfreq_list_lock);
@@ -557,6 +552,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->dev.parent = dev;
devfreq->dev.class = devfreq_class;
devfreq->dev.release = devfreq_dev_release;
+ INIT_LIST_HEAD(&devfreq->node);
devfreq->profile = profile;
strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
devfreq->previous_freq = profile->initial_freq;
--
2.20.1
From: James Smart <jsmart2021(a)gmail.com>
[ Upstream commit 863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f ]
In nvme-fc: it's possible to have connected active controllers
and as no references are taken on the LLDD, the LLDD can be
unloaded. The controller would enter a reconnect state and as
long as the LLDD resumed within the reconnect timeout, the
controller would resume. But if a namespace on the controller
is the root device, allowing the driver to unload can be problematic.
To reload the driver, it may require new io to the boot device,
and as it's no longer connected we get into a catch-22 that
eventually fails, and the system locks up.
Fix this issue by taking a module reference for every connected
controller (which is what the core layer did to the transport
module). Reference is cleared when the controller is removed.
Acked-by: Himanshu Madhani <hmadhani(a)marvell.com>
Reviewed-by: Christoph Hellwig <hch(a)lst.de>
Signed-off-by: James Smart <jsmart2021(a)gmail.com>
Signed-off-by: Keith Busch <kbusch(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/nvme/host/fc.c | 14 ++++++++++++--
drivers/nvme/target/fcloop.c | 1 +
drivers/scsi/lpfc/lpfc_nvme.c | 2 ++
drivers/scsi/qla2xxx/qla_nvme.c | 1 +
include/linux/nvme-fc-driver.h | 4 ++++
5 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 058d542647dd5..9e4d2ecf736d5 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -337,7 +337,8 @@ nvme_fc_register_localport(struct nvme_fc_port_info *pinfo,
!template->ls_req || !template->fcp_io ||
!template->ls_abort || !template->fcp_abort ||
!template->max_hw_queues || !template->max_sgl_segments ||
- !template->max_dif_sgl_segments || !template->dma_boundary) {
+ !template->max_dif_sgl_segments || !template->dma_boundary ||
+ !template->module) {
ret = -EINVAL;
goto out_reghost_failed;
}
@@ -1762,6 +1763,7 @@ nvme_fc_ctrl_free(struct kref *ref)
{
struct nvme_fc_ctrl *ctrl =
container_of(ref, struct nvme_fc_ctrl, ref);
+ struct nvme_fc_lport *lport = ctrl->lport;
unsigned long flags;
if (ctrl->ctrl.tagset) {
@@ -1787,6 +1789,7 @@ nvme_fc_ctrl_free(struct kref *ref)
if (ctrl->ctrl.opts)
nvmf_free_options(ctrl->ctrl.opts);
kfree(ctrl);
+ module_put(lport->ops->module);
}
static void
@@ -2765,10 +2768,15 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
goto out_fail;
}
+ if (!try_module_get(lport->ops->module)) {
+ ret = -EUNATCH;
+ goto out_free_ctrl;
+ }
+
idx = ida_simple_get(&nvme_fc_ctrl_cnt, 0, 0, GFP_KERNEL);
if (idx < 0) {
ret = -ENOSPC;
- goto out_free_ctrl;
+ goto out_mod_put;
}
ctrl->ctrl.opts = opts;
@@ -2915,6 +2923,8 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
out_free_ida:
put_device(ctrl->dev);
ida_simple_remove(&nvme_fc_ctrl_cnt, ctrl->cnum);
+out_mod_put:
+ module_put(lport->ops->module);
out_free_ctrl:
kfree(ctrl);
out_fail:
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index 096523d8dd422..b8fe8702065bc 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -693,6 +693,7 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
#define FCLOOP_DMABOUND_4G 0xFFFFFFFF
static struct nvme_fc_port_template fctemplate = {
+ .module = THIS_MODULE,
.localport_delete = fcloop_localport_delete,
.remoteport_delete = fcloop_remoteport_delete,
.create_queue = fcloop_create_queue,
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index fcf4b4175d771..af937b91765e6 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -1591,6 +1591,8 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport,
/* Declare and initialization an instance of the FC NVME template. */
static struct nvme_fc_port_template lpfc_nvme_template = {
+ .module = THIS_MODULE,
+
/* initiator-based functions */
.localport_delete = lpfc_nvme_localport_delete,
.remoteport_delete = lpfc_nvme_remoteport_delete,
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 6b33a1f24f561..7dceed0212361 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -578,6 +578,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
}
static struct nvme_fc_port_template qla_nvme_fc_transport = {
+ .module = THIS_MODULE,
.localport_delete = qla_nvme_localport_delete,
.remoteport_delete = qla_nvme_remoteport_delete,
.create_queue = qla_nvme_alloc_queue,
diff --git a/include/linux/nvme-fc-driver.h b/include/linux/nvme-fc-driver.h
index a726f96010d59..e9c3b98df3e25 100644
--- a/include/linux/nvme-fc-driver.h
+++ b/include/linux/nvme-fc-driver.h
@@ -279,6 +279,8 @@ struct nvme_fc_remote_port {
*
* Host/Initiator Transport Entrypoints/Parameters:
*
+ * @module: The LLDD module using the interface
+ *
* @localport_delete: The LLDD initiates deletion of a localport via
* nvme_fc_deregister_localport(). However, the teardown is
* asynchronous. This routine is called upon the completion of the
@@ -392,6 +394,8 @@ struct nvme_fc_remote_port {
* Value is Mandatory. Allowed to be zero.
*/
struct nvme_fc_port_template {
+ struct module *module;
+
/* initiator-based functions */
void (*localport_delete)(struct nvme_fc_local_port *);
void (*remoteport_delete)(struct nvme_fc_remote_port *);
--
2.20.1
From: James Smart <jsmart2021(a)gmail.com>
[ Upstream commit 863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f ]
In nvme-fc: it's possible to have connected active controllers
and as no references are taken on the LLDD, the LLDD can be
unloaded. The controller would enter a reconnect state and as
long as the LLDD resumed within the reconnect timeout, the
controller would resume. But if a namespace on the controller
is the root device, allowing the driver to unload can be problematic.
To reload the driver, it may require new io to the boot device,
and as it's no longer connected we get into a catch-22 that
eventually fails, and the system locks up.
Fix this issue by taking a module reference for every connected
controller (which is what the core layer did to the transport
module). Reference is cleared when the controller is removed.
Acked-by: Himanshu Madhani <hmadhani(a)marvell.com>
Reviewed-by: Christoph Hellwig <hch(a)lst.de>
Signed-off-by: James Smart <jsmart2021(a)gmail.com>
Signed-off-by: Keith Busch <kbusch(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/nvme/host/fc.c | 14 ++++++++++++--
drivers/nvme/target/fcloop.c | 1 +
drivers/scsi/lpfc/lpfc_nvme.c | 2 ++
drivers/scsi/qla2xxx/qla_nvme.c | 1 +
include/linux/nvme-fc-driver.h | 4 ++++
5 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 565bddcfd130d..d567035571bf2 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -342,7 +342,8 @@ nvme_fc_register_localport(struct nvme_fc_port_info *pinfo,
!template->ls_req || !template->fcp_io ||
!template->ls_abort || !template->fcp_abort ||
!template->max_hw_queues || !template->max_sgl_segments ||
- !template->max_dif_sgl_segments || !template->dma_boundary) {
+ !template->max_dif_sgl_segments || !template->dma_boundary ||
+ !template->module) {
ret = -EINVAL;
goto out_reghost_failed;
}
@@ -1986,6 +1987,7 @@ nvme_fc_ctrl_free(struct kref *ref)
{
struct nvme_fc_ctrl *ctrl =
container_of(ref, struct nvme_fc_ctrl, ref);
+ struct nvme_fc_lport *lport = ctrl->lport;
unsigned long flags;
if (ctrl->ctrl.tagset) {
@@ -2011,6 +2013,7 @@ nvme_fc_ctrl_free(struct kref *ref)
if (ctrl->ctrl.opts)
nvmf_free_options(ctrl->ctrl.opts);
kfree(ctrl);
+ module_put(lport->ops->module);
}
static void
@@ -3040,10 +3043,15 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
goto out_fail;
}
+ if (!try_module_get(lport->ops->module)) {
+ ret = -EUNATCH;
+ goto out_free_ctrl;
+ }
+
idx = ida_simple_get(&nvme_fc_ctrl_cnt, 0, 0, GFP_KERNEL);
if (idx < 0) {
ret = -ENOSPC;
- goto out_free_ctrl;
+ goto out_mod_put;
}
ctrl->ctrl.opts = opts;
@@ -3185,6 +3193,8 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
out_free_ida:
put_device(ctrl->dev);
ida_simple_remove(&nvme_fc_ctrl_cnt, ctrl->cnum);
+out_mod_put:
+ module_put(lport->ops->module);
out_free_ctrl:
kfree(ctrl);
out_fail:
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index 291f4121f516a..f0536d341f2f2 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -825,6 +825,7 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
#define FCLOOP_DMABOUND_4G 0xFFFFFFFF
static struct nvme_fc_port_template fctemplate = {
+ .module = THIS_MODULE,
.localport_delete = fcloop_localport_delete,
.remoteport_delete = fcloop_remoteport_delete,
.create_queue = fcloop_create_queue,
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index f73726e55e44d..6c355d87c709d 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -1903,6 +1903,8 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport,
/* Declare and initialization an instance of the FC NVME template. */
static struct nvme_fc_port_template lpfc_nvme_template = {
+ .module = THIS_MODULE,
+
/* initiator-based functions */
.localport_delete = lpfc_nvme_localport_delete,
.remoteport_delete = lpfc_nvme_remoteport_delete,
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 5590d6e8b5762..db367e428095d 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -560,6 +560,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
}
static struct nvme_fc_port_template qla_nvme_fc_transport = {
+ .module = THIS_MODULE,
.localport_delete = qla_nvme_localport_delete,
.remoteport_delete = qla_nvme_remoteport_delete,
.create_queue = qla_nvme_alloc_queue,
diff --git a/include/linux/nvme-fc-driver.h b/include/linux/nvme-fc-driver.h
index 496ff759f84c6..2f3ae41c212dc 100644
--- a/include/linux/nvme-fc-driver.h
+++ b/include/linux/nvme-fc-driver.h
@@ -282,6 +282,8 @@ struct nvme_fc_remote_port {
*
* Host/Initiator Transport Entrypoints/Parameters:
*
+ * @module: The LLDD module using the interface
+ *
* @localport_delete: The LLDD initiates deletion of a localport via
* nvme_fc_deregister_localport(). However, the teardown is
* asynchronous. This routine is called upon the completion of the
@@ -395,6 +397,8 @@ struct nvme_fc_remote_port {
* Value is Mandatory. Allowed to be zero.
*/
struct nvme_fc_port_template {
+ struct module *module;
+
/* initiator-based functions */
void (*localport_delete)(struct nvme_fc_local_port *);
void (*remoteport_delete)(struct nvme_fc_remote_port *);
--
2.20.1
From: Stephan Gerhold <stephan(a)gerhold.net>
[ Upstream commit c131280c03bd1c225c2e64e9ef75873ffca3d96e ]
The "panel" pointer is not reset to NULL if of_drm_find_panel()
returns an error. Therefore we later assume that a panel was found,
and try to dereference the error pointer, resulting in:
mcde-dsi a0351000.dsi: failed to find panel try bridge (4294966779)
Unable to handle kernel paging request at virtual address fffffe03
PC is at drm_panel_bridge_add.part.0+0x10/0x5c
LR is at mcde_dsi_bind+0x120/0x464
...
Reset "panel" to NULL to avoid this problem.
Also change the format string of the error to %ld to print
the negative errors correctly. The crash above then becomes:
mcde-dsi a0351000.dsi: failed to find panel try bridge (-517)
mcde-dsi a0351000.dsi: no panel or bridge
...
Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Stephan Gerhold <stephan(a)gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118130252.170324-1-steph…
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/gpu/drm/mcde/mcde_dsi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index f9c9e32b299c9..35bb825d19188 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -935,11 +935,13 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
for_each_available_child_of_node(dev->of_node, child) {
panel = of_drm_find_panel(child);
if (IS_ERR(panel)) {
- dev_err(dev, "failed to find panel try bridge (%lu)\n",
+ dev_err(dev, "failed to find panel try bridge (%ld)\n",
PTR_ERR(panel));
+ panel = NULL;
+
bridge = of_drm_find_bridge(child);
if (IS_ERR(bridge)) {
- dev_err(dev, "failed to find bridge (%lu)\n",
+ dev_err(dev, "failed to find bridge (%ld)\n",
PTR_ERR(bridge));
return PTR_ERR(bridge);
}
--
2.20.1
This is a follow up of fc5db58539b4 ("x86/quirks: Disable HPET on Intel
Coffe Lake platforms"), which addressed the issue for 8th generation
Coffee Lake. Intel has released Coffee Lake again for 9th generation,
apparently still with the same bug:
clocksource: timekeeping watchdog on CPU3: Marking clocksource 'tsc' as unstable because the skew is too large:
clocksource: 'hpet' wd_now: 24f422b8 wd_last: 247dea41 mask: ffffffff
clocksource: 'tsc' cs_now: 144d927c4e cs_last: 140ba6e2a0 mask: ffffffffffffffff
tsc: Marking TSC unstable due to clocksource watchdog
TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
sched_clock: Marking unstable (26553416234, 4203921)<-(26567277071, -9656937)
clocksource: Switched to clocksource hpet
So, we add another quirk for the chipset
Signed-off-by: Jason A. Donenfeld <Jason(a)zx2c4.com>
Cc: Feng Tang <feng.tang(a)intel.com>
Cc: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
---
arch/x86/kernel/early-quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 4cba91ec8049..a73f88dd7f86 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -712,6 +712,8 @@ static struct chipset early_qrk[] __initdata = {
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
{ PCI_VENDOR_ID_INTEL, 0x3ec4,
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
+ { PCI_VENDOR_ID_INTEL, 0x3e20,
+ PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
{ PCI_VENDOR_ID_BROADCOM, 0x4331,
PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset},
{}
--
2.24.0
Make sure to check the return value of usb_altnum_to_altsetting() to
avoid dereferencing a NULL pointer when the requested alternate settings
is missing.
The format altsetting number may come from a quirk table and there does
not seem to be any other validation of it (the corresponding index is
checked however).
Fixes: b099b9693d23 ("ALSA: usb-audio: Avoid superfluous usb_set_interface() calls")
Cc: stable <stable(a)vger.kernel.org> # 4.18
Signed-off-by: Johan Hovold <johan(a)kernel.org>
---
sound/usb/pcm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 9c8930bb00c8..73dd9d21bb42 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -506,9 +506,9 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
if (WARN_ON(!iface))
return -EINVAL;
alts = usb_altnum_to_altsetting(iface, fmt->altsetting);
- altsd = get_iface_desc(alts);
- if (WARN_ON(altsd->bAlternateSetting != fmt->altsetting))
+ if (WARN_ON(!alts))
return -EINVAL;
+ altsd = get_iface_desc(alts);
if (fmt == subs->cur_audiofmt)
return 0;
--
2.24.1
As the rseq selftests can run for a long period of time, disable the
timeout that the general selftests have.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com>
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Cc: "Paul E. McKenney" <paulmck(a)linux.ibm.com>
Cc: Boqun Feng <boqun.feng(a)gmail.com>
Cc: "H . Peter Anvin" <hpa(a)zytor.com>
Cc: Paul Turner <pjt(a)google.com>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
---
tools/testing/selftests/rseq/settings | 1 +
1 file changed, 1 insertion(+)
create mode 100644 tools/testing/selftests/rseq/settings
diff --git a/tools/testing/selftests/rseq/settings b/tools/testing/selftests/rseq/settings
new file mode 100644
index 000000000000..e7b9417537fb
--- /dev/null
+++ b/tools/testing/selftests/rseq/settings
@@ -0,0 +1 @@
+timeout=0
--
2.17.1
Hi,
Here is a small set of rseq fixes aiming Linux 5.4. Those should be
backported to stable kernels >= 4.18.
Thanks,
Mathieu
Mathieu Desnoyers (3):
rseq: Fix: Reject unknown flags on rseq unregister
rseq: Fix: Unregister rseq for clone CLONE_VM
rseq/selftests: Fix: Namespace gettid() for compatibility with glibc
2.30
include/linux/sched.h | 4 ++--
kernel/rseq.c | 2 ++
tools/testing/selftests/rseq/param_test.c | 18 ++++++++++--------
3 files changed, 14 insertions(+), 10 deletions(-)
--
2.17.1
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 7c7e53e1c93df14690bd12c1f84730fef927a6f1 Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Date: Tue, 5 Nov 2019 19:51:29 +0900
Subject: [PATCH] PCI: rcar: Fix missing MACCTLR register setting in
initialization sequence
The R-Car Gen2/3 manual - available at:
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz/…
"RZ/G Series User's Manual: Hardware" section
strictly enforces the MACCTLR inizialization value - 39.3.1 - "Initial
Setting of PCI Express":
"Be sure to write the initial value (= H'80FF 0000) to MACCTLR before
enabling PCIETCTLR.CFINIT".
To avoid unexpected behavior and to match the SW initialization sequence
guidelines, this patch programs the MACCTLR with the correct value.
Note that the MACCTLR.SPCHG bit in the MACCTLR register description
reports that "Only writing 1 is valid and writing 0 is invalid" but this
"invalid" has to be interpreted as a write-ignore aka "ignored", not
"prohibited".
Reported-by: Eugeniu Rosca <erosca(a)de.adit-jv.com>
Fixes: c25da4778803 ("PCI: rcar: Add Renesas R-Car PCIe driver")
Fixes: be20bbcb0a8c ("PCI: rcar: Add the initialization of PCIe link in resume_noirq()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas(a)glider.be>
Cc: <stable(a)vger.kernel.org> # v5.2+
diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 40d8c54a17d1..94ba4fe21923 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -91,8 +91,11 @@
#define LINK_SPEED_2_5GTS (1 << 16)
#define LINK_SPEED_5_0GTS (2 << 16)
#define MACCTLR 0x011058
+#define MACCTLR_NFTS_MASK GENMASK(23, 16) /* The name is from SH7786 */
#define SPEED_CHANGE BIT(24)
#define SCRAMBLE_DISABLE BIT(27)
+#define LTSMDIS BIT(31)
+#define MACCTLR_INIT_VAL (LTSMDIS | MACCTLR_NFTS_MASK)
#define PMSR 0x01105c
#define MACS2R 0x011078
#define MACCGSPSETR 0x011084
@@ -613,6 +616,8 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
if (IS_ENABLED(CONFIG_PCI_MSI))
rcar_pci_write_reg(pcie, 0x801f0000, PCIEMSITXR);
+ rcar_pci_write_reg(pcie, MACCTLR_INIT_VAL, MACCTLR);
+
/* Finish initialization - establish a PCI Express link */
rcar_pci_write_reg(pcie, CFINIT, PCIETCTLR);
@@ -1235,6 +1240,7 @@ static int rcar_pcie_resume_noirq(struct device *dev)
return 0;
/* Re-establish the PCIe link */
+ rcar_pci_write_reg(pcie, MACCTLR_INIT_VAL, MACCTLR);
rcar_pci_write_reg(pcie, CFINIT, PCIETCTLR);
return rcar_pcie_wait_for_dl(pcie);
}
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: c7cfa74dd315 - Linux 5.4.6-rc1
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/349420
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP
✅ Loopdev Sanity
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ httpd: mod_ssl smoke sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ jvm test suite
🚧 ✅ Memory function: kaslr
🚧 ✅ LTP: openposix test suite
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ audit: audit testsuite test
🚧 ✅ iotop: sanity
🚧 ✅ Usex - version 1.9-29
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ IPMI driver test
🚧 ✅ IPMItool loop stress test
🚧 ✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP
✅ Loopdev Sanity
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns tunnel
✅ httpd: mod_ssl smoke sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ jvm test suite
🚧 ✅ Memory function: kaslr
🚧 ✅ LTP: openposix test suite
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ audit: audit testsuite test
🚧 ✅ iotop: sanity
🚧 ✅ Usex - version 1.9-29
🚧 ✅ storage: dm/common
x86_64:
Host 1:
✅ Boot test
✅ Storage SAN device stress - megaraid_sas
Host 2:
✅ Boot test
✅ Storage SAN device stress - mpt3sas driver
Host 3:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
⚡⚡⚡ Boot test
⚡⚡⚡ xfstests: ext4
⚡⚡⚡ xfstests: xfs
⚡⚡⚡ lvm thinp sanity
⚡⚡⚡ storage: software RAID testing
🚧 ⚡⚡⚡ IOMMU boot test
🚧 ⚡⚡⚡ IPMI driver test
🚧 ⚡⚡⚡ IPMItool loop stress test
🚧 ⚡⚡⚡ selinux-policy: serge-testsuite
🚧 ⚡⚡⚡ power-management: cpupower/sanity test
🚧 ⚡⚡⚡ Storage blktests
Host 4:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP
✅ Loopdev Sanity
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ httpd: mod_ssl smoke sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ jvm test suite
🚧 ✅ Memory function: kaslr
🚧 ✅ LTP: openposix test suite
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ audit: audit testsuite test
🚧 ✅ iotop: sanity
🚧 ✅ Usex - version 1.9-29
🚧 ✅ storage: dm/common
Host 5:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ IOMMU boot test
🚧 ✅ IPMI driver test
🚧 ✅ IPMItool loop stress test
🚧 ✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
Waived tests
------------
If the test run included waived tests, they are marked with 🚧. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.