Go to file
Baokun Li 2331fd4a49 ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks()
After updating bb_free in mb_free_blocks, it is possible to return without
updating bb_fragments because the block being freed is found to have
already been freed, which leads to inconsistency between bb_free and
bb_fragments.

Since the group may be unlocked in ext4_grp_locked_error(), this can lead
to problems such as dividing by zero when calculating the average fragment
length. Hence move the update of bb_free to after the block double-free
check guarantees that the corresponding statistics are updated only after
the core block bitmap is modified.

Fixes: eabe0444df ("ext4: speed-up releasing blocks on commit")
CC:  <stable@vger.kernel.org> # 3.10
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240104142040.2835097-5-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2024-01-18 10:50:24 -05:00
Documentation This update includes the following changes: 2024-01-10 12:23:43 -08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
arch This update includes the following changes: 2024-01-10 12:23:43 -08:00
block Many singleton patches against the MM code. The patch series which 2024-01-09 11:18:47 -08:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto crypto: scomp - fix req->dst buffer overflow 2023-12-29 11:25:56 +08:00
drivers This update includes the following changes: 2024-01-10 12:23:43 -08:00
fs ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks() 2024-01-18 10:50:24 -05:00
include Various ext4 bug fixes and cleanups for v6.8-rc1. The fixes are 2024-01-10 16:09:14 -08:00
init init/Kconfig: move more items into the EXPERT menu 2023-12-20 15:02:58 -08:00
io_uring Many singleton patches against the MM code. The patch series which 2024-01-09 11:18:47 -08:00
ipc Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
kernel hardening updates for v6.8-rc1 2024-01-10 11:03:52 -08:00
lib This update includes the following changes: 2024-01-10 12:23:43 -08:00
mm New code for 6.8: 2024-01-10 08:45:22 -08:00
net keys, dns: Fix size check of V1 server-list header 2024-01-10 13:20:08 -08:00
rust Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
samples hardening updates for v6.8-rc1 2024-01-10 11:03:52 -08:00
scripts Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
security integrity-v6.8 2024-01-09 13:24:06 -08:00
sound linux_kselftest-kunit-6.8-rc1 2024-01-09 17:16:58 -08:00
tools This update includes the following changes: 2024-01-10 12:23:43 -08:00
usr usr/Kconfig: fix typos of "its" 2023-12-20 15:02:58 -08:00
virt vfs-6.8.misc 2024-01-08 10:26:08 -08:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap lsm/stable-6.8 PR 20240105 2024-01-09 12:57:46 -08:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS unicode updates 2024-01-10 16:06:58 -08:00
Makefile Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06: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.