No description
Find a file
Peter Zijlstra f506ed5538 sched/core: Avoid spurious lock dependencies
[ Upstream commit ff51ff84d8 ]

While seemingly harmless, __sched_fork() does hrtimer_init(), which,
when DEBUG_OBJETS, can end up doing allocations.

This then results in the following lock order:

  rq->lock
    zone->lock.rlock
      batched_entropy_u64.lock

Which in turn causes deadlocks when we do wakeups while holding that
batched_entropy lock -- as the random code does.

Solve this by moving __sched_fork() out from under rq->lock. This is
safe because nothing there relies on rq->lock, as also evident from the
other __sched_fork() callsite.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: bigeasy@linutronix.de
Cc: cl@linux.com
Cc: keescook@chromium.org
Cc: penberg@kernel.org
Cc: rientjes@google.com
Cc: thgarnie@google.com
Cc: tytso@mit.edu
Cc: will@kernel.org
Fixes: b7d5dc2107 ("random: add a spinlock_t to struct batched_entropy")
Link: https://lkml.kernel.org/r/20191001091837.GK4536@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:37:29 +01:00
arch arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator 2019-12-17 20:37:20 +01:00
block block: fix the DISCARD request merge 2019-12-01 09:13:49 +01:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: user - support incremental algorithm dumps 2019-12-05 15:37:16 +01:00
Documentation HID: doc: fix wrong data structure reference for UHID_OUTPUT 2019-12-05 15:37:31 +01:00
drivers Input: cyttsp4_core - fix use after free bug 2019-12-17 20:37:28 +01:00
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fs exportfs_decode_fh(): negative pinned may become positive without the parent locked 2019-12-17 20:37:26 +01:00
include futex: Add mutex around futex exit 2019-12-05 15:38:28 +01:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 15:37:52 +01:00
ipc ipc/mqueue.c: only perform resource calculation if user valid 2019-08-06 19:05:24 +02:00
kernel sched/core: Avoid spurious lock dependencies 2019-12-17 20:37:29 +01:00
lib lib/genalloc.c: include vmalloc.h 2019-12-05 15:37:53 +01:00
mm vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n 2019-12-05 15:37:51 +01:00
net xfrm: release device reference for invalid state 2019-12-17 20:37:28 +01:00
samples vfio-mdev/samples: Use u8 instead of char for handle functions 2019-12-05 15:37:27 +01:00
scripts scripts/gdb: fix debugging modules compiled with hot/cold partitioning 2019-12-05 15:37:04 +01:00
security apparmor: delete the dentry in aafs_remove() to avoid a leak 2019-12-05 15:38:01 +01:00
sound ASoC: stm32: i2s: fix IRQ clearing 2019-12-05 15:38:34 +01:00
tools usbip: tools: fix fd leakage in the function of read_attr_usbip_status 2019-12-01 09:14:29 +01:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:55:14 +02:00
virt kvm: properly check debugfs dentry before using it 2019-12-05 15:37:59 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:43:20 -07:00
Makefile Linux 4.14.158 2019-12-05 15:38:36 +01:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.