blatt A1
Go to file
Jan Kara cbbe17a324 Revert "mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again"
commit 30139c702048f1097342a31302cbd3d478f50c63 upstream.

Patch series "mm: Avoid possible overflows in dirty throttling".

Dirty throttling logic assumes dirty limits in page units fit into
32-bits.  This patch series makes sure this is true (see patch 2/2 for
more details).


This patch (of 2):

This reverts commit 9319b647902cbd5cc884ac08a8a6d54ce111fc78.

The commit is broken in several ways.  Firstly, the removed (u64) cast
from the multiplication will introduce a multiplication overflow on 32-bit
archs if wb_thresh * bg_thresh >= 1<<32 (which is actually common - the
default settings with 4GB of RAM will trigger this).  Secondly, the
div64_u64() is unnecessarily expensive on 32-bit archs.  We have
div64_ul() in case we want to be safe & cheap.  Thirdly, if dirty
thresholds are larger than 1<<32 pages, then dirty balancing is going to
blow up in many other spectacular ways anyway so trying to fix one
possible overflow is just moot.

Link: https://lkml.kernel.org/r/20240621144017.30993-1-jack@suse.cz
Link: https://lkml.kernel.org/r/20240621144246.11148-1-jack@suse.cz
Fixes: 9319b647902c ("mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-By: Zach O'Keefe <zokeefe@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-11 12:47:14 +02:00
arch riscv: kexec: Avoid deadlock in kexec crash path 2024-07-11 12:47:12 +02:00
block block/ioctl: prefer different overflow check 2024-06-27 13:46:15 +02:00
certs
crypto crypto: aead,cipher - zeroize key buffer after use 2024-07-11 12:47:05 +02:00
Documentation dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema 2024-07-05 09:31:44 +02:00
drivers can: kvaser_usb: Explicitly initialize family in leafimx driver_info struct 2024-07-11 12:47:14 +02:00
fs f2fs: Add inline to f2fs_build_fault_attr() stub 2024-07-11 12:47:14 +02:00
include fsnotify: Do not generate events for O_PATH file descriptors 2024-07-11 12:47:14 +02:00
init smp: Provide 'setup_max_cpus' definition on UP too 2024-06-16 13:41:42 +02:00
io_uring io_uring/sqpoll: work around a potential audit memory leak 2024-06-27 13:46:14 +02:00
ipc
kernel mm: optimize the redundant loop of mm_update_owner_next() 2024-07-11 12:47:13 +02:00
lib kunit: Fix timeout message 2024-07-11 12:47:08 +02:00
LICENSES
mm Revert "mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again" 2024-07-11 12:47:14 +02:00
net inet_diag: Initialize pad field in struct inet_diag_req_v2 2024-07-11 12:47:12 +02:00
rust rust: macros: fix soundness issue in module! macro 2024-05-17 11:56:17 +02:00
samples
scripts kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-07-05 09:31:57 +02:00
security ima: Fix use-after-free on a dentry's dname.name 2024-07-05 09:31:51 +02:00
sound ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11. 2024-07-05 09:31:56 +02:00
tools selftests: make order checking verbose in msg_zerocopy selftest 2024-07-11 12:47:12 +02:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-06-27 13:46:21 +02:00
.clang-format inet: ping: use hlist_nulls rcu iterator during lookup 2022-12-01 12:42:46 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add leah to 6.1 MAINTAINERS file 2024-05-17 11:56:16 +02:00
Makefile Linux 6.1.97 2024-07-05 09:32:02 +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.