aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/cppc_acpi.c
diff options
context:
space:
mode:
authorMikulas Patocka <[email protected]>2022-09-14 20:55:51 +0000
committerJens Axboe <[email protected]>2022-09-15 06:25:17 +0000
commitc4fa368466cc1b60bb92f867741488930ddd6034 (patch)
treea80c5a294daf07f3ff4951a5ee205721f8cdb48c /drivers/acpi/cppc_acpi.c
parentblock: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait (diff)
downloadkernel-c4fa368466cc1b60bb92f867741488930ddd6034.tar.gz
kernel-c4fa368466cc1b60bb92f867741488930ddd6034.zip
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 <[email protected]> Cc: [email protected] # 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 <[email protected]>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions