Go to file
Roman Gushchin 8a175e137b mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
commit 0362f326d8 upstream.

An exiting task might belong to an offline cgroup.  In this case an
attempt to grab a cgroup reference from the task can end up with an
infinite loop in hugetlb_cgroup_charge_cgroup(), because neither the
cgroup will become online, neither the task will be migrated to a live
cgroup.

Fix this by switching over to css_tryget().  As css_tryget_online()
can't guarantee that the cgroup won't go offline, in most cases the
check doesn't make sense.  In this particular case users of
hugetlb_cgroup_charge_cgroup() are not affected by this change.

A similar problem is described by commit 18fa84a2db ("cgroup: Use
css_tryget() instead of css_tryget_online() in task_get_css()").

Link: http://lkml.kernel.org/r/20191106225131.3543616-2-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20 17:59:33 +01:00
Documentation kvm: x86: mmu: Recovery of shattered NX large pages 2019-11-12 19:19:08 +01:00
arch powerpc/perf: Fix kfree memory allocated for nest pmus 2019-11-20 17:59:26 +01:00
block blk-mq: move cancel of requeue_work to the front of blk_exit_queue 2019-10-05 12:47:37 +02:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: skcipher - Unmap pages after an external error 2019-10-11 18:18:32 +02:00
drivers i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present 2019-11-20 17:59:31 +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 ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either 2019-11-20 17:59:32 +01:00
include iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros 2019-11-20 17:59:32 +01:00
init init: initialize jump labels before command line option parsing 2019-05-16 19:42:23 +02:00
ipc ipc/mqueue.c: only perform resource calculation if user valid 2019-08-06 19:05:24 +02:00
kernel cpu/speculation: Uninline and export CPU mitigations helpers 2019-11-12 19:19:04 +01:00
lib lib/scatterlist: Introduce sgl_alloc() and sgl_free() 2019-11-12 19:18:30 +01:00
mm mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() 2019-11-20 17:59:33 +01:00
net ipvs: move old_secure_tcp into struct netns_ipvs 2019-11-12 19:18:38 +01:00
samples samples, bpf: fix to change the buffer size for read() 2019-07-21 09:04:17 +02:00
scripts scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks 2019-11-06 12:42:55 +01:00
security ima: always return negative code for error 2019-10-11 18:18:37 +02:00
sound ALSA: usb-audio: not submit urb for stopped endpoint 2019-11-20 17:59:28 +01:00
tools perf tools: Fix time sorting 2019-11-12 19:18:03 +01:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:55:14 +02:00
virt kvm: x86: mmu: Recovery of shattered NX large pages 2019-11-12 19:19:08 +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.154 2019-11-12 19:19:08 +01:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

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.