No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xiu Jianfeng 4f3e9217fb cgroup: Fix potential overflow issue when checking max_depth
[ Upstream commit 3cc4e13bb1617f6a13e5e6882465984148743cf4 ]

cgroup.max.depth is the maximum allowed descent depth below the current
cgroup. If the actual descent depth is equal or larger, an attempt to
create a new child cgroup will fail. However due to the cgroup->max_depth
is of int type and having the default value INT_MAX, the condition
'level > cgroup->max_depth' will never be satisfied, and it will cause
an overflow of the level after it reaches to INT_MAX.

Fix it by starting the level from 0 and using '>=' instead.

It's worth mentioning that this issue is unlikely to occur in reality,
as it's impossible to have a depth of INT_MAX hierarchy, but should be
be avoided logically.

Fixes: 1a926e0bba ("cgroup: implement hierarchy limits")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 16:20:52 +01:00
arch arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning 2024-11-08 16:20:52 +01:00
block blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race 2024-11-08 16:20:48 +01:00
certs
crypto crypto: aead,cipher - zeroize key buffer after use 2024-11-08 16:20:33 +01:00
Documentation arm64: errata: Expand speculative SSBS workaround once more 2024-11-08 16:20:42 +01:00
drivers hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event 2024-11-08 16:20:51 +01:00
fs nilfs2: fix kernel bug due to missing clearing of buffer delay flag 2024-11-08 16:20:51 +01:00
include genetlink: hold RCU in genlmsg_mcast() 2024-11-08 16:20:50 +01:00
init init: open /initrd.image with O_LARGEFILE 2024-04-13 12:51:36 +02:00
ipc ipc: replace costly bailout check in sysvipc_find_ipc() 2024-09-04 13:15:02 +02:00
kernel cgroup: Fix potential overflow issue when checking max_depth 2024-11-08 16:20:52 +01:00
lib debugobjects: Fix conditions in fill_pool() 2024-11-08 16:20:34 +01:00
LICENSES
mm mm/swapfile: skip HugeTLB pages for unuse_vma 2024-11-08 16:20:47 +01:00
net xfrm: validate new SA's prefixlen using SA family when sel.family is unset 2024-11-08 16:20:52 +01:00
samples
scripts scripts: kconfig: merge_config: config files: add a trailing newline 2024-11-08 16:20:24 +01:00
security selinux: improve error checking in sel_write_load() 2024-11-08 16:20:52 +01:00
sound ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593 2024-11-08 16:20:51 +01:00
tools tools/iio: Add memory allocation failure check for trigger_name 2024-11-08 16:20:45 +01:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-11-08 16:20:47 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-11-08 16:20:33 +01:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.284 2024-09-12 11:03:57 +02: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.