block: integrity: Do not call set_page_dirty_lock()
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 16 Apr 2025 20:04:10 +0000 (16:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:47:50 +0000 (10:47 +0200)
commitc38a005e6efb9ddfa06bd8353b82379d6fd5d6c4
tree1d8011b64e4bae2d59af85ee84476cb31f4ac105
parentdb42e6f28bdf957959b4aa37b84439b0e468ccae
block: integrity: Do not call set_page_dirty_lock()

commit 39e160505198ff8c158f11bce2ba19809a756e8b upstream.

Placing multiple protection information buffers inside the same page
can lead to oopses because set_page_dirty_lock() can't be called from
interrupt context.

Since a protection information buffer is not backed by a file there is
no point in setting its page dirty, there is nothing to synchronize.
Drop the call to set_page_dirty_lock() and remove the last argument to
bio_integrity_unpin_bvec().

Cc: stable@vger.kernel.org
Fixes: 492c5d455969 ("block: bio-integrity: directly map user buffers")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/yq1v7r3ev9g.fsf@ca-mkp.ca.oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/bio-integrity.c