This is an automatic generated email to let you know that the following patch were queued:
Subject: media: ov8865: Disable only enabled regulators on error path
Author: Sakari Ailus <sakari.ailus(a)linux.intel.com>
Date: Wed Dec 15 09:38:48 2021 +0100
If powering on the sensor failed, the entire power-off sequence was run
independently of how far the power-on sequence proceeded before the error.
This lead to disabling regulators and/or clock that was not enabled.
Fix this by disabling only clocks and regulators that were enabled
previously.
Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor")
Cc: stable(a)vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus(a)linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/media/i2c/ov8865.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
index ebdb20d3fe9d..d9d016cfa9ac 100644
--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -2407,27 +2407,27 @@ static int ov8865_sensor_power(struct ov8865_sensor *sensor, bool on)
if (ret) {
dev_err(sensor->dev,
"failed to enable DOVDD regulator\n");
- goto disable;
+ return ret;
}
ret = regulator_enable(sensor->avdd);
if (ret) {
dev_err(sensor->dev,
"failed to enable AVDD regulator\n");
- goto disable;
+ goto disable_dovdd;
}
ret = regulator_enable(sensor->dvdd);
if (ret) {
dev_err(sensor->dev,
"failed to enable DVDD regulator\n");
- goto disable;
+ goto disable_avdd;
}
ret = clk_prepare_enable(sensor->extclk);
if (ret) {
dev_err(sensor->dev, "failed to enable EXTCLK clock\n");
- goto disable;
+ goto disable_dvdd;
}
gpiod_set_value_cansleep(sensor->reset, 0);
@@ -2436,14 +2436,16 @@ static int ov8865_sensor_power(struct ov8865_sensor *sensor, bool on)
/* Time to enter streaming mode according to power timings. */
usleep_range(10000, 12000);
} else {
-disable:
gpiod_set_value_cansleep(sensor->powerdown, 1);
gpiod_set_value_cansleep(sensor->reset, 1);
clk_disable_unprepare(sensor->extclk);
+disable_dvdd:
regulator_disable(sensor->dvdd);
+disable_avdd:
regulator_disable(sensor->avdd);
+disable_dovdd:
regulator_disable(sensor->dovdd);
}
This is the start of the stable review cycle for the 5.10.86 release.
There are 33 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 Fri, 17 Dec 2021 17:20:14 +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.10.86-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.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.10.86-rc1
Mike Rapoport <rppt(a)kernel.org>
arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM
Mike Rapoport <rppt(a)kernel.org>
arm: extend pfn_valid to take into account freed memory map alignment
Mike Rapoport <rppt(a)kernel.org>
memblock: ensure there is no overflow in memblock_overlaps_region()
Mike Rapoport <rppt(a)kernel.org>
memblock: align freed memory map on pageblock boundaries with SPARSEMEM
Mike Rapoport <rppt(a)kernel.org>
memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix error timestamp setting on the decoder error path
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix missing 'instruction' events with 'q' option
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix next 'err' value, walking trace
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix state setting when receiving overflow (OVF) packet
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix sync state when a PSB (synchronization) packet is found
Adrian Hunter <adrian.hunter(a)intel.com>
perf intel-pt: Fix some PGE (packet generation enable/control flow packets) usage
Adrian Hunter <adrian.hunter(a)intel.com>
perf inject: Fix itrace space allowed for new attributes
Antoine Tenart <atenart(a)kernel.org>
ethtool: do not perform operations on net devices being unregistered
Armin Wolf <W_Armin(a)gmx.de>
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: make sure reclaim doesn't write the inode
Bui Quang Minh <minhquangbui99(a)gmail.com>
bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc
Nikita Yushchenko <nikita.yoush(a)cogentembedded.com>
staging: most: dim2: use device release method
Sean Christopherson <seanjc(a)google.com>
KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI req
Chen Jun <chenjun102(a)huawei.com>
tracing: Fix a kmemleak false positive in tracing_map
Perry Yuan <Perry.Yuan(a)amd.com>
drm/amd/display: add connector type check for CRC source set
Mustapha Ghaddar <mghaddar(a)amd.com>
drm/amd/display: Fix for the no Audio bug with Tiled Displays
Harshit Mogalapalli <harshit.m.mogalapalli(a)oracle.com>
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Ondrej Jirman <megous(a)megous.com>
i2c: rk3x: Handle a spurious start completion interrupt flag
Helge Deller <deller(a)gmx.de>
parisc/agp: Annotate parisc agp init functions with __init
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda/hdmi: fix HDA codec entry table order for ADL-P
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid
Erik Ekman <erik(a)kryo.se>
net/mlx4_en: Update reported link modes for 1/10G
Alexander Stein <alexander.stein(a)ew.tq-group.com>
Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
Ilie Halip <ilie.halip(a)gmail.com>
s390/test_unwind: use raw opcode instead of invalid instruction
Marc Zyngier <maz(a)kernel.org>
KVM: arm64: Save PSTATE early on exit
Philip Chen <philipchen(a)chromium.org>
drm/msm/dsi: set default num_data_lanes
Tadeusz Struk <tadeusz.struk(a)linaro.org>
nfc: fix segfault in nfc_genl_dump_devices_done
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mm/init.c | 37 ++++++----
arch/arm/mm/ioremap.c | 4 +-
arch/arm64/kvm/hyp/include/hyp/switch.h | 6 ++
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 7 +-
arch/s390/lib/test_unwind.c | 5 +-
arch/x86/kvm/hyperv.c | 7 +-
drivers/char/agp/parisc-agp.c | 6 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 8 +++
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +
drivers/hwmon/dell-smm-hwmon.c | 7 +-
drivers/i2c/busses/i2c-rk3x.c | 4 +-
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 +-
drivers/staging/most/dim2/dim2.c | 55 +++++++-------
drivers/tty/serial/fsl_lpuart.c | 1 +
fs/fuse/dir.c | 8 +++
fs/fuse/file.c | 15 ++++
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 3 +
kernel/bpf/devmap.c | 4 +-
kernel/trace/tracing_map.c | 3 +
mm/memblock.c | 3 +-
net/core/sock_map.c | 2 +-
net/ethtool/netlink.h | 3 +
net/netlink/af_netlink.c | 5 ++
net/nfc/netlink.c | 6 +-
sound/pci/hda/hda_intel.c | 12 +++-
sound/pci/hda/patch_hdmi.c | 3 +-
tools/perf/builtin-inject.c | 2 +-
.../perf/util/intel-pt-decoder/intel-pt-decoder.c | 83 ++++++++++++++--------
tools/perf/util/intel-pt.c | 1 +
32 files changed, 224 insertions(+), 93 deletions(-)
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 7aa3e3011ef3e0a9c36417eafca7894a028e5df6
Gitweb: https://git.kernel.org/tip/7aa3e3011ef3e0a9c36417eafca7894a028e5df6
Author: Andrew Cooper <andrew.cooper3(a)citrix.com>
AuthorDate: Thu, 16 Dec 2021 00:08:56
Committer: Dave Hansen <dave.hansen(a)linux.intel.com>
CommitterDate: Thu, 16 Dec 2021 09:39:40 -08:00
x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
Both __pkru_allows_write() and arch_set_user_pkey_access() shift
PKRU_WD_BIT (a signed constant) by up to 30 bits, hitting the
sign bit.
Use unsigned constants instead.
Clearly pkey 15 has not been used in combination with UBSAN yet.
Noticed by code inspection only. I can't actually provoke the
compiler into generating incorrect logic as far as this shift is
concerned, so haven't included a fixes tag.
[
dhansen: add stable@ tag, plus minor changelog massaging,
For anyone doing backports, these #defines were in
arch/x86/include/asm/pgtable.h before 784a46618f6.
]
Fixes: 33a709b25a76 ("mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys")
Signed-off-by: Andrew Cooper <andrew.cooper3(a)citrix.com>
Signed-off-by: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
Link: https://lkml.kernel.org/r/20211216000856.4480-1-andrew.cooper3@citrix.com
---
arch/x86/include/asm/pkru.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/pkru.h b/arch/x86/include/asm/pkru.h
index 4cd49af..74f0a2d 100644
--- a/arch/x86/include/asm/pkru.h
+++ b/arch/x86/include/asm/pkru.h
@@ -4,8 +4,8 @@
#include <asm/cpufeature.h>
-#define PKRU_AD_BIT 0x1
-#define PKRU_WD_BIT 0x2
+#define PKRU_AD_BIT 0x1u
+#define PKRU_WD_BIT 0x2u
#define PKRU_BITS_PER_PKEY 2
#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
this seems to break build of 5.10.y (and maybe earlier) for me:
CALL scripts/checksyscalls.sh - due to target missing
CALL scripts/atomic/check-atomics.sh - due to target missing
CHK include/generated/compile.h
AS arch/arm64/kvm/hyp/nvhe/hyp-init.nvhe.o - due to target missing
arch/arm64/kvm/hyp/nvhe/hyp-init.S: Assembler messages:
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: unexpected characters following instruction at operand 2 -- `mov x1,#((1U<<31)|(1<<23))'
arch/arm64/kvm/hyp/nvhe/Makefile:28: recipe for target 'arch/arm64/kvm/hyp/nvhe/hyp-init.nvhe.o' failed
make[5]: *** [arch/arm64/kvm/hyp/nvhe/hyp-init.nvhe.o] Error 1
scripts/Makefile.build:497: recipe for target 'arch/arm64/kvm/hyp/nvhe' failed
make[4]: *** [arch/arm64/kvm/hyp/nvhe] Error 2
scripts/Makefile.build:497: recipe for target 'arch/arm64/kvm/hyp' failed
make[3]: *** [arch/arm64/kvm/hyp] Error 2
scripts/Makefile.build:497: recipe for target 'arch/arm64/kvm' failed
make[2]: *** [arch/arm64/kvm] Error 2
Makefile:1822: recipe for target 'arch/arm64' failed
make[1]: *** [arch/arm64] Error 2
Makefile:336: recipe for target '__build_one_by_one' failed
make: *** [__build_one_by_one] Error 2
Looking at the problematic line 87 of hyp-init.S shows that
there is a macro expansion:
mov x1, #TCR_EL2_RES1
This macro was modified by the $subject patch
(commit c71b5f37b5ff1a673b2e4a91d1b34ea027546e23 in v5.10.y)
and reverting the patch makes the compile succeed.
Now: why does it build for me for v5.15.y and v5.16-rc5?
I think it is because my build system switches to gcc 6.3
instead of gcc 4.9 depending on scripts/min-tool-version.sh.
So I assume that the fix is not compatible with the minimum
requirement for 5.10.y of gcc 4.9 (or even less - I don't know exactly).
Earlier kernels may also be affected if $subject patch was also
backported there, but I have not tested.
This should somehow be fixed so that arch/arm64/include/asm/kvm_arm.h
can be included by older assemblers.
BR and thanks,
Nikolaus Schaller
I'm announcing the release of the 5.4.166 kernel.
Only change here is a permission setting of a netfilter selftest file.
No need to upgrade if this problem is not bothering you.
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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Greg Kroah-Hartman (2):
netfilter: selftest: conntrack_vrf.sh: fix file permission
Linux 5.4.166
I'm announcing the release of the 5.10.86 kernel.
Only change here is a permission setting of a netfilter selftest file.
No need to upgrade if this problem is not bothering you.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Greg Kroah-Hartman (2):
netfilter: selftest: conntrack_vrf.sh: fix file permission
Linux 5.10.86