Go to file
Stephan Mueller 7d2c3f54e6 crypto: af_alg - remove locking in async callback
The code paths protected by the socket-lock do not use or modify the
socket in a non-atomic fashion. The actions pertaining the socket do not
even need to be handled as an atomic operation. Thus, the socket-lock
can be safely ignored.

This fixes a bug regarding scheduling in atomic as the callback function
may be invoked in interrupt context.

In addition, the sock_hold is moved before the AIO encrypt/decrypt
operation to ensure that the socket is always present. This avoids a
tiny race window where the socket is unprotected and yet used by the AIO
operation.

Finally, the release of resources for a crypto operation is moved into a
common function of af_alg_free_resources.

Cc: <stable@vger.kernel.org>
Fixes: e870456d8e ("crypto: algif_skcipher - overhaul memory management")
Fixes: d887c52d6a ("crypto: algif_aead - overhaul memory management")
Reported-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Tested-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-11-24 13:23:39 +08:00
arch
block
certs
crypto crypto: af_alg - remove locking in async callback 2017-11-24 13:23:39 +08:00
Documentation dt-bindings: rng: Document BCM7278 RNG200 compatible 2017-11-10 19:20:08 +08:00
drivers crypto: stm32/hash - Fix return issue on update 2017-11-10 19:20:23 +08:00
firmware
fs cifs: move to generic async completion 2017-11-03 22:11:21 +08:00
include crypto: af_alg - remove locking in async callback 2017-11-24 13:23:39 +08:00
init
ipc
kernel
lib lib/mpi: call cond_resched() from mpi_powm() loop 2017-11-10 19:20:26 +08:00
mm
net net: use -ENOSPC for transient busy indication 2017-11-03 22:11:17 +08:00
samples
scripts
security ima: move to generic async completion 2017-11-03 22:11:21 +08:00
sound
tools
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: update maintainer for qat 2017-11-06 14:45:01 +08:00
Makefile
README

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.