linux-stable/drivers
Samu Nuutamo 6eb9f8e4a6 hwmon: (da9052) Synchronize access with mfd
[ Upstream commit 333e22db22 ]

When tsi-as-adc is configured it is possible for in7[0123]_input read to
return an incorrect value if a concurrent read to in[456]_input is
performed. This is caused by a concurrent manipulation of the mux
channel without proper locking as hwmon and mfd use different locks for
synchronization.

Switch hwmon to use the same lock as mfd when accessing the TSI channel.

Fixes: 4f16cab19a ("hwmon: da9052: Add support for TSI channel")
Signed-off-by: Samu Nuutamo <samu.nuutamo@vincit.fi>
[rebase to current master, reword commit message slightly]
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-20 08:17:09 +02:00
..
accessibility
acpi PM: ACPI: Output correct message on target power state 2020-05-05 19:15:50 +02:00
amba
android binder: take read mode of mmap_sem in binder_alloc_free_page() 2020-05-02 17:24:39 +02:00
ata libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set 2020-04-24 08:00:45 +02:00
atm fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-28 16:36:00 +01:00
auxdisplay
base arch_topology: Fix section miss match warning due to free_raw_capacity() 2020-04-24 08:01:03 +02:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-27 14:46:45 +01:00
block virtio-blk: handle block_device_operations callbacks after hot unplug 2020-05-20 08:17:05 +02:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-01-09 10:17:57 +01:00
bus bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-24 08:00:23 +02:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 13:59:52 +01:00
char ipmi: Fix NULL pointer dereference in ssif_probe 2020-05-20 08:17:08 +02:00
clk clk: tegra: Fix Tegra PMC clock out parents 2020-04-24 08:01:18 +02:00
clocksource clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-02-28 16:35:57 +01:00
connector
cpufreq cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once 2020-05-20 08:17:06 +02:00
cpuidle cpuidle: Do not unset the driver if it is there already 2019-12-17 20:39:33 +01:00
crypto crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static 2020-05-02 17:24:12 +02:00
dax
dca
devfreq Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" 2020-03-11 18:02:50 +01:00
dio
dma dmaengine: mmp_tdma: Reset channel error on release 2020-05-20 08:17:06 +02:00
dma-buf dma-buf: Fix memory leak in sync_file_merge() 2019-12-21 10:47:50 +01:00
edac EDAC/amd64: Set grain per DIMM 2020-03-11 18:02:56 +01:00
eisa
extcon extcon: sm5502: Reset registers during initialization 2019-12-31 12:37:06 +01:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:17:59 +01:00
firmware efi/x86: Ignore the memory attributes table on i386 2020-04-24 08:00:28 +02:00
fmc
fpga
fsi fsi: core: Fix small accesses and unaligned offsets via sysfs 2019-12-31 12:37:35 +01:00
gpio Revert "gpio: set up initial state from .get_direction()" 2020-04-24 08:01:02 +02:00
gpu drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper() 2020-05-20 08:17:07 +02:00
hid HID: usbhid: Fix race between usbhid_close() and usbhid_stop() 2020-05-20 08:16:57 +02:00
hsi
hv hv_balloon: Balloon up according to request page number 2020-02-14 16:32:12 -05:00
hwmon hwmon: (da9052) Synchronize access with mfd 2020-05-20 08:17:09 +02:00
hwspinlock
hwtracing intel_th: pci: Add Elkhart Lake CPU support 2020-04-02 16:34:18 +02:00
i2c i2c: altera: use proper variable to hold errno 2020-05-02 17:24:41 +02:00
ide ide: serverworks: potential overflow in svwks_set_pio_mode() 2020-02-28 16:36:05 +01:00
idle
iio iio:ad7797: Use correct attribute_group 2020-05-02 17:24:40 +02:00
infiniband IB/mlx4: Test return value of calls to ib_get_cached_pkey 2020-05-20 08:17:09 +02:00
input Input: i8042 - add Acer Aspire 5738z to nomux list 2020-04-24 08:00:44 +02:00
iommu iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system 2020-05-05 19:15:52 +02:00
ipack
irqchip irqchip/mbigen: Free msi_desc on device teardown 2020-04-24 08:01:01 +02:00
isdn staging: gigaset: add endpoint-type sanity check 2019-12-17 20:39:06 +01:00
leds leds: pca963x: Fix open-drain initialization 2020-02-28 16:35:55 +01:00
lightnvm lightnvm: pblk: fix lock order in pblk_rb_tear_down_check 2020-01-27 14:46:32 +01:00
macintosh
mailbox mailbox: mailbox-test: fix null pointer if no mmio 2019-12-05 15:38:31 +01:00
mcb
md dm verity fec: fix hash block number in verity_fec_decode 2020-05-05 19:15:50 +02:00
media media: ti-vpe: cal: fix disable_irqs to only the intended target 2020-04-24 08:00:35 +02:00
memory
memstick
message scsi: mptfusion: Fix double fetch bug in ioctl 2020-01-23 08:20:31 +01:00
mfd mfd: dln2: Fix sanity checking for endpoints 2020-04-24 08:00:52 +02:00
misc misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-24 08:00:51 +02:00
mmc mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers 2020-05-05 19:15:49 +02:00
mtd mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer 2020-05-02 17:24:39 +02:00
mux
net net: moxa: Fix a potential double 'free_irq()' 2020-05-20 08:17:05 +02:00
nfc NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() 2020-04-02 16:34:25 +02:00
ntb NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks 2020-01-27 14:46:05 +01:00
nubus
nvdimm libnvdimm: Out of bounds read in __nd_ioctl() 2020-04-24 08:01:22 +02:00
nvme nvme-fc: Revert "add module to ops template to allow module references" 2020-04-24 08:00:36 +02:00
nvmem nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing 2020-01-27 14:46:39 +01:00
of of: unittest: kmemleak in of_unittest_platform_populate() 2020-04-24 08:01:17 +02:00
oprofile
parisc
parport parport: load lowlevel driver if ports not found 2019-12-31 12:37:39 +01:00
pci PCI/ASPM: Allow re-enabling Clock PM 2020-05-02 17:24:15 +02:00
pcmcia
perf drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer 2020-04-02 16:34:14 +02:00
phy phy: qualcomm: Adjust indentation in read_poll_timeout 2020-02-14 16:32:17 -05:00
pinctrl pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler 2020-05-20 08:17:08 +02:00
platform platform/x86: pmc_atom: Add Lex 2I385SW to critclk_systems DMI table 2020-04-02 16:34:37 +02:00
pnp
power power: supply: bq27xxx_battery: Silence deferred-probe error 2020-04-24 08:01:18 +02:00
powercap
pps
ps3
ptp ptp: free ptp device pin descriptors properly 2020-01-23 08:20:35 +01:00
pwm pwm: bcm2835: Dynamically allocate base 2020-05-02 17:24:15 +02:00
rapidio drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen() 2020-01-27 14:46:25 +01:00
ras
regulator regulator: rk808: Lower log level on optional GPIOs being not available 2020-02-28 16:35:59 +01:00
remoteproc remoteproc: Fix wrong rvring index computation 2020-05-02 17:24:39 +02:00
reset
rpmsg rpmsg: glink: smem: Ensure ordering during tx 2020-04-24 08:01:06 +02:00
rtc rtc: 88pm860x: fix possible race condition 2020-04-24 08:01:18 +02:00
s390 s390/cio: avoid duplicated 'ADD' uevents 2020-05-02 17:24:14 +02:00
sbus
scsi scsi: sg: add sg_remove_request in sg_write 2020-05-20 08:17:06 +02:00
sfi
sh
sn
soc soc: imx: gpc: fix power up sequencing 2020-04-24 08:01:18 +02:00
spi spi/zynqmp: remove entry that causes a cs glitch 2020-04-02 16:34:13 +02:00
spmi
ssb
staging staging: vt6656: Power save stop wake_up_count wrap around. 2020-05-02 17:24:37 +02:00
target scsi: target/iblock: fix WRITE SAME zeroing 2020-05-05 19:15:52 +02:00
tc
tee tee: optee: Fix compilation issue with nommu 2020-02-05 14:18:24 +00:00
thermal thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power 2020-01-27 14:46:34 +01:00
thunderbolt thunderbolt: Prevent crash if non-active NVMem file is read 2020-02-28 16:36:09 +01:00
tty serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-05-02 17:24:38 +02:00
uio uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() 2020-02-28 16:35:57 +01:00
usb USB: serial: garmin_gps: add sanity checking for data length 2020-05-20 08:16:57 +02:00
uwb
vfio vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() 2020-05-05 19:15:51 +02:00
vhost vhost: vsock: kick send_pkt worker once device is started 2020-05-10 10:28:58 +02:00
video fbdev: potential information leak in do_fb_ioctl() 2020-04-24 08:01:23 +02:00
virt
virtio virtio_balloon: prevent pfn array overflow 2020-02-28 16:36:09 +01:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-28 16:36:04 +01:00
w1
watchdog watchdog: reset last_hw_keepalive time at start 2020-05-02 17:24:12 +02:00
xen xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status 2020-05-02 17:24:44 +02:00
zorro
Kconfig
Makefile