Performance oriented customized Linux kernel based on the mainline kernel.
Find a file
David Howells 13b7955a02 rxrpc: Don't take call->user_mutex in rxrpc_new_incoming_call()
Standard kernel mutexes cannot be used in any way from interrupt or softirq
context, so the user_mutex which manages access to a call cannot be a mutex
since on a new call the mutex must start off locked and be unlocked within
the softirq handler to prevent userspace interfering with a call we're
setting up.

Commit a0855d24fc ("locking/mutex: Complain
upon mutex API misuse in IRQ contexts") causes big warnings to be splashed
in dmesg for each a new call that comes in from the server.  Whilst it
*seems* like it should be okay, since the accept path uses trylock, there
are issues with PI boosting and marking the wrong task as the owner.

Fix this by not taking the mutex in the softirq path at all.  It's not
obvious that there should be any need for it as the state is set before the
first notification is generated for the new call.

There's also no particular reason why the link-assessing ping should be
triggered inside the mutex.  It's not actually transmitted there anyway,
but rather it has to be deferred to a workqueue.

Further, I don't think that there's any particular reason that the socket
notification needs to be done from within rx->incoming_lock, so the amount
of time that lock is held can be shortened too and the ping prepared before
the new call notification is sent.

Fixes: 540b1c48c3 ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Peter Zijlstra (Intel) <peterz@infradead.org>
cc: Ingo Molnar <mingo@redhat.com>
cc: Will Deacon <will@kernel.org>
cc: Davidlohr Bueso <dave@stgolabs.net>
2019-12-20 16:20:56 +00:00
arch bpf, mips: Limit to 33 tail calls 2019-12-11 13:57:22 +01:00
block
certs
crypto
Documentation linux-can-fixes-for-5.5-20191208 2019-12-09 09:27:47 -08:00
drivers nfc: s3fwrn5: replace the assertion with a WARN_ON 2019-12-19 17:33:23 -08:00
fs
include of: mdio: export of_mdiobus_child_is_phy 2019-12-19 17:32:21 -08:00
init
ipc
kernel bpf: Fix record_func_key to perform backtracking on r3 2019-12-19 13:39:22 -08:00
lib
LICENSES
mm
net rxrpc: Don't take call->user_mutex in rxrpc_new_incoming_call() 2019-12-20 16:20:56 +00:00
samples samples: bpf: fix syscall_tp due to unused syscall 2019-12-11 15:28:06 -08:00
scripts
security
sound
tools Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-12-19 14:20:47 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add entry for myself 2019-12-13 15:15:33 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Add maintainers for rmnet 2019-12-13 15:14:24 -08:00
Makefile Linux 5.5-rc1 2019-12-08 14:57:55 -08: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.

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.