Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Dave Chinner f387897cf5 block: fix 32 bit overflow in __blkdev_issue_discard()
commit 4800bf7bc8c725e955fcbc6191cc872f43f506d3 upstream.

A discard cleanup merged into 4.20-rc2 causes fstests xfs/259 to
fall into an endless loop in the discard code. The test is creating
a device that is exactly 2^32 sectors in size to test mkfs boundary
conditions around the 32 bit sector overflow region.

mkfs issues a discard for the entire device size by default, and
hence this throws a sector count of 2^32 into
blkdev_issue_discard(). It takes the number of sectors to discard as
a sector_t - a 64 bit value.

The commit ba5d73851e71 ("block: cleanup __blkdev_issue_discard")
takes this sector count and casts it to a 32 bit value before
comapring it against the maximum allowed discard size the device
has. This truncates away the upper 32 bits, and so if the lower 32
bits of the sector count is zero, it starts issuing discards of
length 0. This causes the code to fall into an endless loop, issuing
a zero length discards over and over again on the same sector.

Fixes: ba5d73851e71 ("block: cleanup __blkdev_issue_discard")
Tested-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>

Killed pointless WARN_ON().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-01 09:37:12 +00:00
arch arc: eznps: fix allmodconfig kconfig warning 2020-02-01 09:37:06 +00:00
block block: fix 32 bit overflow in __blkdev_issue_discard() 2020-02-01 09:37:12 +00:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto crypto: af_alg - Use bh_lock_sock in sk_destruct 2020-02-01 09:37:11 +00:00
Documentation Documentation: Document arm64 kpti control 2020-01-29 16:43:19 +01:00
drivers random: try to actively add entropy rather than passively wait for it 2020-02-01 09:37:11 +00:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs cifs: Fix memory allocation in __smb2_handle_cancelled_cmd() 2020-02-01 09:37:04 +00:00
include ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition 2020-02-01 09:37:10 +00:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 09:21:04 +01:00
ipc ipc/mqueue.c: only perform resource calculation if user valid 2019-08-06 19:06:52 +02:00
kernel sched/fair: Fix insertion in rq->leaf_cfs_rq_list 2020-02-01 09:37:10 +00:00
lib Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" 2020-01-27 14:51:08 +01:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm mm/memory_hotplug: shrink zones when offlining memory 2020-01-29 16:43:27 +01:00
net net_sched: fix ops->bind_class() implementations 2020-02-01 09:37:06 +00:00
samples samples/bpf: Fix broken xdp_rxq_info due to map order assumptions 2020-01-27 14:51:22 +01:00
scripts ARM: 8950/1: ftrace/recordmcount: filter relocation types 2020-01-29 16:43:19 +01:00
security keys: Timestamp new keys 2020-01-27 14:50:23 +01:00
sound ASoC: sun4i-i2s: RX and TX counter registers are swapped 2020-01-27 14:51:05 +01:00
tools tools: bpftool: fix format strings and arguments for jsonw_printf() 2020-01-27 14:51:05 +01:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:57:16 +02:00
virt KVM: arm/arm64: vgic: Don't rely on the wrong pending table 2019-12-13 08:52:45 +01:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:44:47 -07:00
Makefile Linux 4.19.100 2020-01-29 16:43:27 +01:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

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.
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.