android_kernel_oneplus_msm8998/drivers
Thomas Gleixner f1a0a872d0 ACPI/processor: Replace racy task affinity logic
[ Upstream commit 8153f9ac43897f9f4786b30badc134fcc1a4fb11 ]

acpi_processor_get_throttling() requires to invoke the getter function on
the target CPU. This is achieved by temporarily setting the affinity of the
calling user space thread to the requested CPU and reset it to the original
affinity afterwards.

That's racy vs. CPU hotplug and concurrent affinity settings for that
thread resulting in code executing on the wrong CPU and overwriting the
new affinity setting.

acpi_processor_get_throttling() is invoked in two ways:

1) The CPU online callback, which is already running on the target CPU and
   obviously protected against hotplug and not affected by affinity
   settings.

2) The ACPI driver probe function, which is not protected against hotplug
   during modprobe.

Switch it over to work_on_cpu() and protect the probe function against CPU
hotplug.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-acpi@vger.kernel.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Len Brown <lenb@kernel.org>
Link: http://lkml.kernel.org/r/20170412201042.785920903@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 10:58:40 +01:00
..
accessibility
acpi ACPI/processor: Replace racy task affinity logic 2018-03-24 10:58:40 +01:00
amba
android binder: add missing binder_unlock() 2018-02-28 10:17:23 +01:00
ata ahci: Add Intel Cannon Lake PCH-H PCI ID 2018-02-16 20:09:42 +01:00
atm atm: horizon: Fix irq release error 2017-12-16 10:33:55 +01:00
auxdisplay
base drivers: base: cacheinfo: fix boot error message when acpi is enabled 2018-01-31 12:06:08 +01:00
bcma bcma: use (get|put)_device when probing/removing device driver 2017-03-12 06:37:30 +01:00
block loop: Fix lost writes caused by missing flag 2018-03-18 11:17:49 +01:00
bluetooth Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version 2018-02-16 20:09:46 +01:00
bus sunxi-rsb: Include OF based modalias in device uevent 2018-01-10 09:27:09 +01:00
cdrom
char tpm_tis: fix potential buffer overruns caused by bit glitches on the bus 2018-03-24 10:58:39 +01:00
clk clk: qcom: msm8916: fix mnd_width for codec_digcodec 2018-03-22 09:23:28 +01:00
clocksource clockevents/drivers/cs5535: Improve resilience to spurious interrupts 2017-10-27 10:23:17 +02:00
connector
cpufreq cpufreq: Fix governor module removal race 2018-03-22 09:23:28 +01:00
cpuidle cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:22:15 +01:00
crypto crypto: s5p-sss - Fix kernel Oops in AES-ECB mode 2018-02-25 11:03:55 +01:00
dca
devfreq PM / devfreq: Propagate error from devfreq_add_device() 2018-02-22 15:44:58 +01:00
dio
dma dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped 2018-03-22 09:23:22 +01:00
dma-buf
edac EDAC, octeon: Fix an uninitialized variable warning 2018-02-16 20:09:47 +01:00
eisa
extcon extcon: palmas: Check the parent instance to prevent the NULL 2017-11-21 09:21:18 +01:00
firewire firewire: net: fix fragmented datagram_size off-by-one 2016-11-10 16:36:35 +01:00
firmware efi/esrt: Cleanup bad memory map log messages 2017-12-20 10:04:56 +01:00
fmc
fpga
gpio gpio: xgene: mark PM functions as __maybe_unused 2018-02-25 11:03:50 +01:00
gpu drm/amdgpu/dce: Don't turn off DP sink when disconnected 2018-03-22 09:23:31 +01:00
hid HID: elo: clear BTN_LEFT mapping 2018-03-22 09:23:27 +01:00
hsi
hv Drivers: hv: vmbus: fix build warning 2018-02-25 11:03:46 +01:00
hwmon driver: (adm1275) set the m,b and R coefficients correctly for power 2018-03-22 09:23:22 +01:00
hwspinlock
hwtracing coresight: Fixes coresight DT parse to get correct output port ID. 2018-03-22 09:23:25 +01:00
i2c i2c: remove __init from i2c_register_board_info() 2018-02-25 11:03:48 +01:00
ide
idle idle: i7300: add PCI dependency 2018-02-25 11:03:51 +01:00
iio iio: adis_lib: Initialize trigger before requesting interrupt 2018-02-28 10:17:22 +01:00
infiniband RDMA/mlx5: Fix integer overflow while resizing CQ 2018-03-18 11:17:48 +01:00
input Input: ar1021_i2c - fix too long name in driver's device table 2018-03-24 10:58:40 +01:00
iommu iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range 2018-03-22 09:23:24 +01:00
ipack
irqchip irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis 2018-03-22 09:23:31 +01:00
isdn isdn: sc: work around type mismatch warning 2018-02-25 11:03:51 +01:00
leds Revert "led: core: Fix brightness setting when setting delay_off=0" 2018-03-11 16:19:45 +01:00
lguest
lightnvm lightnvm: put bio before return 2016-09-24 10:07:35 +02:00
macintosh
mailbox mailbox: handle empty message in tx_tick 2017-08-06 19:19:41 -07:00
mcb
md md/raid6: Fix anomily when recovering a single device in RAID6. 2018-03-22 09:23:25 +01:00
media media: cpia2: Fix a couple off by one bugs 2018-03-22 09:23:29 +01:00
memory ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure 2017-12-16 10:33:51 +01:00
memstick memstick: rtsx_usb_ms: Manage runtime PM when accessing the device 2016-10-28 03:01:35 -04:00
message mptfusion: hide unused seq_mpt_print_ioc_summary function 2018-02-25 11:03:45 +01:00
mfd mfd: twl6040: Fix child-node lookup 2018-01-02 20:33:20 +01:00
misc scsi: ses: don't get power status of SES device slot on probe 2018-03-22 09:23:24 +01:00
mmc mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version 2018-01-31 12:06:09 +01:00
mtd mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]() 2018-03-22 09:23:28 +01:00
net ipvlan: add L2 check for packets arriving via virtual devices 2018-03-22 09:23:30 +01:00
nfc NFC: nfcmrvl: double free on error path 2018-03-22 09:23:23 +01:00
ntb ntb_transport: fix bug calculating num_qps_mw 2017-08-30 10:19:29 +02:00
nubus
nvdimm libnvdimm, namespace: make 'resource' attribute only readable by root 2017-11-30 08:37:23 +00:00
nvme nvme: Fix managing degraded controllers 2018-02-16 20:09:47 +01:00
nvmem nvmem: imx-ocotp: Fix wrong register size 2017-08-06 19:19:46 -07:00
of of: fix of_device_get_modalias returned length when truncating buffers 2018-03-22 09:23:21 +01:00
oprofile
parisc parisc: Hide Diva-built-in serial aux and graphics card 2018-01-02 20:33:20 +01:00
parport parisc, parport_gsc: Fixes for printk continuation lines 2017-06-17 06:39:37 +02:00
pci PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() 2018-03-22 09:23:19 +01:00
pcmcia
perf drivers/perf: arm_pmu: handle no platform_device 2018-03-22 09:23:26 +01:00
phy phy: work around 'phys' references to usb-nop-xceiv devices 2018-01-23 19:50:16 +01:00
pinctrl pinctrl: sunxi: Fix A80 interrupt pin bank 2018-02-25 11:03:39 +01:00
platform platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA 2018-03-24 10:58:40 +01:00
pnp
power power: bq27xxx_battery: mark some symbols __maybe_unused 2018-02-25 11:03:50 +01:00
powercap
pps
ps3
ptp time: Change posix clocks ops interfaces to use timespec64 2018-03-24 10:58:40 +01:00
pwm pwm: tegra: Increase precision in PWM rate calculation 2018-03-22 09:23:27 +01:00
rapidio
ras
regulator regulator: anatop: set default voltage selector for pcie 2018-03-24 10:58:40 +01:00
remoteproc
reset
rpmsg
rtc rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs 2018-03-24 10:58:40 +01:00
s390 s390/qeth: fix IPA command submission race 2018-03-11 16:19:47 +01:00
sbus
scsi scsi: sg: only check for dxfer_len greater than 256M 2018-03-22 09:23:32 +01:00
sfi
sh
sn
soc soc: qcom/spm: shut up uninitialized variable warning 2016-09-24 10:07:42 +02:00
spi spi: sun6i: disable/unprepare clocks on remove 2018-03-22 09:23:28 +01:00
spmi spmi: Include OF based modalias in device uevent 2017-07-27 15:06:10 -07:00
ssb ssb: mark ssb_bus_register as __maybe_unused 2018-02-25 11:03:44 +01:00
staging staging: android: ashmem: Fix possible deadlock in ashmem_ioctl 2018-03-24 10:58:40 +01:00
target target/user: Fix cast from pointer to phys_addr_t 2018-02-25 11:03:46 +01:00
tc
thermal thermal: spear: use __maybe_unused for PM functions 2018-02-25 11:03:44 +01:00
thunderbolt
tty serial: 8250_pci: Add Brainboxes UC-260 4 port serial device 2018-03-18 11:17:53 +01:00
uio uio: fix dmem_region_start computation 2016-10-31 04:13:59 -06:00
usb usb: gadget: bdc: 64-bit pointer capability check 2018-03-22 09:23:32 +01:00
uwb uwb: ensure that endpoint is interrupt 2017-10-12 11:27:35 +02:00
vfio vfio-pci: Handle error from pci_iomap 2017-08-06 19:19:46 -07:00
vhost vhost_net: stop device during reset owner 2018-02-16 20:09:38 +01:00
video video/hdmi: Allow "empty" HDMI infoframes 2018-03-22 09:23:27 +01:00
virt
virtio virtio_balloon: prevent uninitialized variable use 2018-02-25 11:03:42 +01:00
vlynq
vme vme: Fix wrong pointer utilization in ca91cx42_slave_get 2017-01-19 20:17:21 +01:00
w1 w1: ds2490: USB transfer buffers need to be DMAable 2017-03-12 06:37:29 +01:00
watchdog watchdog: hpwdt: fix unused variable warning 2018-03-18 11:17:50 +01:00
xen xen/gntdev: Fix partial gntdev_mmap() cleanup 2018-03-03 10:19:45 +01:00
zorro
Kconfig
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2018-02-25 11:03:38 +01:00