android_kernel_samsung_msm8976/Documentation
Zefan Li bbc314da7d cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags
commit 2ad654bc5e2b211e92f66da1d819e47d79a866f0 upstream.

When we change cpuset.memory_spread_{page,slab}, cpuset will flip
PF_SPREAD_{PAGE,SLAB} bit of tsk->flags for each task in that cpuset.
This should be done using atomic bitops, but currently we don't,
which is broken.

Tetsuo reported a hard-to-reproduce kernel crash on RHEL6, which happened
when one thread tried to clear PF_USED_MATH while at the same time another
thread tried to flip PF_SPREAD_PAGE/PF_SPREAD_SLAB. They both operate on
the same task.

Here's the full report:
https://lkml.org/lkml/2014/9/19/230

To fix this, we make PF_SPREAD_PAGE and PF_SPREAD_SLAB atomic flags.

v4:
- updated mm/slab.c. (Fengguang Wu)
- updated Documentation.

Change-Id: I4eef89f5d91eaa2e7e677e662133a7856909a13f
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: Kees Cook <keescook@chromium.org>
Fixes: 950592f7b9 ("cpusets: update tasks' page/slab spread flags in time")
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:44:59 +02:00
..
ABI Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
accounting
acpi
aoe
arm msm: broadcast: Remove unused TSC and TSPP2 drivers 2015-10-07 07:29:13 -07:00
arm64
ata
auxdisplay
backlight
blackfin
block
blockdev UPSTREAM: zram: deprecate zram attrs sysfs nodes 2016-05-18 14:35:54 +05:30
bus-devices
cdrom
cgroups cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags 2019-07-27 21:44:59 +02:00
connector
console
cpu-freq
cpuidle
cris
crypto
development-process
device-mapper CHROMIUM: dm: boot time specification of dm= 2016-05-18 14:36:11 +05:30
devicetree ARM: dts: imx31: fix clock control module interrupts description 2019-07-27 21:42:59 +02:00
DocBook cfg80211: Add option to report the bss entry in connect result 2016-09-07 16:07:24 +05:30
driver-model
dvb
early-userspace
EDID
extcon
fault-injection
fb
filesystems This is the 3.10.101 stable release 2017-04-18 17:17:55 +02:00
firmware_class
frv
hid
hwmon
i2c
i2o
ia64
ide
infiniband
input
ioctl
isdn
ja_JP
kbuild
kdump
ko_KR
laptops
leds
m68k
make
memory-devices
metag
mips
misc-devices
mmc
mn10300
mtd
namespaces
netlabel
networking net: ipv6: Add a sysctl to make optimistic addresses useful candidates 2016-06-10 17:22:49 -07:00
nfc
parisc
PCI
pcmcia
power
powerpc
pps
prctl
pti
ptp
rapidio
RCU
s390
scheduler
scsi scsi: fix race between simultaneous decrements of ->host_failed 2019-07-27 21:41:57 +02:00
security
serial
sh
sound
spi
sysctl Import latest Samsung release 2017-04-18 03:43:52 +02:00
target
thermal
timers time: Remove CONFIG_TIMER_STATS 2017-04-22 23:02:59 +02:00
trace trace: cpufreq: Add tracing for min/max cpufreq 2016-05-18 14:34:41 +05:30
usb
vDSO
video4linux
virtual
vm UPSTREAM: zsmalloc: zsmalloc documentation 2016-05-18 14:35:53 +05:30
w1
watchdog
wimax
x86
xtensa
zh_CN
.gitignore
00-INDEX
android.txt
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
bcache.txt
bif-framework.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt
cachetlb.txt
Changes
circular-buffers.txt
clk.txt
coccinelle.txt
CodingStyle
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
dma-buf-sharing.txt
DMA-ISA-LPC.txt
dmaengine.txt
dmatest.txt
dontdiff
dynamic-debug-howto.txt
edac.txt
eisa.txt
email-clients.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt
highuid.txt
HOWTO
hw_random.txt
hwspinlock.txt
init.txt
initrd.txt
Intel-IOMMU.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kasan.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt mm: larger stack guard gap, between vmas 2017-07-11 00:00:39 +00:00
kernel-per-CPU-kthreads.txt
kmemcheck.txt
kmemleak.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lzo.txt
magic-number.txt
Makefile
ManagementStyle
md.txt
media-framework.txt
memory-barriers.txt
memory-hotplug.txt
mono.txt
mutex-design.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
padata.txt
page_owner.c
parport-lowlevel.txt
parport.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pinctrl.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
pwm.txt
ramoops.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
smsc_ece1099.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
static-keys.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sync.txt
sysfs-rules.txt
sysrq.txt
this_cpu_ops.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vfio.txt
VGA-softcursor.txt
vgaarbiter.txt
video-output.txt
vme_api.txt
volatile-considered-harmful.txt
workqueue.txt
xz.txt
zorro.txt