android_kernel_samsung_univ.../drivers
Thomas Gleixner 88a056441d cpufreq/sh: Replace racy task affinity logic
[ Upstream commit 205dcc1ecbc566cbc20acf246e68de3b080b3ecf ]

The target() callback must run on the affected cpu. This is achieved by
temporarily setting the affinity of the calling thread to the requested CPU
and reset it to the original affinity afterwards.

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

Replace it by work_on_cpu(). All call pathes which invoke the callbacks are
already protected against CPU hotplug.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
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: linux-pm@vger.kernel.org
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
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.958216363@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:41 +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
auxdisplay
base
bcma
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
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
connector
cpufreq cpufreq/sh: Replace racy task affinity logic 2018-03-24 10:58:41 +01:00
cpuidle
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
firewire
firmware
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
macintosh
mailbox
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
memstick
message mptfusion: hide unused seq_mpt_print_ioc_summary function 2018-02-25 11:03:45 +01:00
mfd
misc scsi: ses: don't get power status of SES device slot on probe 2018-03-22 09:23:24 +01:00
mmc
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
nubus
nvdimm
nvme nvme: Fix managing degraded controllers 2018-02-16 20:09:47 +01:00
nvmem
of of: fix of_device_get_modalias returned length when truncating buffers 2018-03-22 09:23:21 +01:00
oprofile
parisc
parport
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
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
spi spi: sun6i: disable/unprepare clocks on remove 2018-03-22 09:23:28 +01:00
spmi
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
usb usb: gadget: bdc: 64-bit pointer capability check 2018-03-22 09:23:32 +01:00
uwb
vfio
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
w1
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