Linux kernel modifications for the Kernel Hacking exam
Find a file
Christoph Hellwig ee8ef0a4b1 epoll: use the waitqueue lock to protect ep->wq
Patch series "waitqueue lockdep annotation", v3.

This series adds a strategic lockdep_assert_held to __wake_up_common to
ensure callers really do hold the wait_queue_head lock when calling the
unlocked wake_up variants.  It turns out epoll did not do this for a
fairly common path (hit all the time by systemd during bootup), so the
second patch fixed this instance as well.

This patch (of 3):

The epoll code currently uses the unlocked waitqueue helpers for managing
ep->wq, but instead of holding the waitqueue lock around these calls, it
uses its own ep->lock spinlock.  Given that the waitqueue is not exposed
to the rest of the kernel this actually works ok at the moment, but
prevents the epoll locking rules from being enforced using lockdep.
Remove ep->lock and use the waitqueue lock to not only reduce the size of
struct eventpoll but also to make sure we can assert locking invariants in
the waitqueue code.

Link: http://lkml.kernel.org/r/20171214152344.6880-2-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Baron <jbaron@akamai.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:47 -07:00
arch module: use relative references for __ksymtab entries 2018-08-22 10:52:47 -07:00
block
certs Replace magic for trusting the secondary keyring with #define 2018-08-16 09:57:20 -07:00
crypto DMAengine updates for v4.19-rc1 2018-08-18 15:55:59 -07:00
Documentation kernel/hung_task.c: allow to set checking interval separately from timeout 2018-08-22 10:52:47 -07:00
drivers PCI: Add support for relative addressing in quirk tables 2018-08-22 10:52:47 -07:00
firmware
fs epoll: use the waitqueue lock to protect ep->wq 2018-08-22 10:52:47 -07:00
include kernel: tracepoints: add support for relative references 2018-08-22 10:52:47 -07:00
init init: allow initcall tables to be emitted using relative references 2018-08-22 10:52:47 -07:00
ipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-08-15 15:04:25 -07:00
kernel kernel: tracepoints: add support for relative references 2018-08-22 10:52:47 -07:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-08-19 11:51:45 -07:00
LICENSES
mm bdi: use irqsave variant of refcount_dec_and_lock() 2018-08-22 10:52:46 -07:00
net The main things are support for cephx v2 authentication protocol and 2018-08-20 18:26:55 -07:00
samples samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM 2018-08-16 21:55:32 +02:00
scripts spelling.txt: add more spellings to spelling.txt 2018-08-22 10:52:47 -07:00
security init: allow initcall tables to be emitted using relative references 2018-08-22 10:52:47 -07:00
sound DMAengine updates for v4.19-rc1 2018-08-18 15:55:59 -07:00
tools proc: test /proc/thread-self symlink 2018-08-22 10:52:45 -07:00
usr
virt mm, oom: distinguish blockable mode for mmu notifiers 2018-08-22 10:52:44 -07:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Merge branch 'linus/master' into rdma.git for-next 2018-08-16 14:21:29 -06:00
COPYING
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild
Kconfig
MAINTAINERS - New Drivers 2018-08-20 15:38:44 -07:00
Makefile Updates for v4.19: 2018-08-20 18:32:00 -07:00
README

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

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

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.