Mikulas Patocka c4fa368466 blk-lib: fix blkdev_issue_secure_erase
There's a bug in blkdev_issue_secure_erase. The statement
"unsigned int len = min_t(sector_t, nr_sects, max_sectors);"
sets the variable "len" to the length in sectors, but the statement
"bio->bi_iter.bi_size = len" treats it as if it were in bytes.
The statements "sector += len << SECTOR_SHIFT" and "nr_sects -= len <<
SECTOR_SHIFT" are thinko.

This patch fixes it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org	# v5.19
Fixes: 44abff2c0b97 ("block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD")
Link: https://lore.kernel.org/r/alpine.LRH.2.02.2209141549480.28100@file01.intranet.prod.int.rdu2.redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-09-15 00:25:17 -06:00
2022-08-04 19:30:35 -07:00
2022-08-04 20:00:14 -07:00
2022-08-03 09:45:08 -07:00
2022-08-04 15:10:55 -07:00
2022-08-04 20:00:14 -07:00
2022-08-03 14:54:52 -07:00
2022-08-04 12:12:54 -07:00
2022-08-04 12:12:54 -07:00
2022-08-04 12:12:54 -07:00
2022-08-02 19:34:45 -07:00
2022-08-04 19:30:35 -07:00
2022-08-04 18:19:14 -07:00
2022-07-27 09:43:07 -07:00
2022-08-03 19:52:08 -07:00
2022-09-02 09:31:15 -06:00
2022-08-02 19:44:56 -07: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.

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.
Description
No description provided
Readme 5.7 GiB
Languages
C 97.6%
Assembly 1%
Shell 0.5%
Python 0.3%
Makefile 0.3%