Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-6.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fix from Mikulas Patocka:

- fix a race condition in dm-integrity

* tag 'for-6.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm-integrity: fix a race condition when accessing recalc_sector

+3 -1
+3 -1
drivers/md/dm-integrity.c
··· 2174 2174 struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io)); 2175 2175 unsigned int journal_section, journal_entry; 2176 2176 unsigned int journal_read_pos; 2177 + sector_t recalc_sector; 2177 2178 struct completion read_comp; 2178 2179 bool discard_retried = false; 2179 2180 bool need_sync_io = ic->internal_hash && dio->op == REQ_OP_READ; ··· 2315 2314 goto lock_retry; 2316 2315 } 2317 2316 } 2317 + recalc_sector = le64_to_cpu(ic->sb->recalc_sector); 2318 2318 spin_unlock_irq(&ic->endio_wait.lock); 2319 2319 2320 2320 if (unlikely(journal_read_pos != NOT_FOUND)) { ··· 2370 2368 if (need_sync_io) { 2371 2369 wait_for_completion_io(&read_comp); 2372 2370 if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING) && 2373 - dio->range.logical_sector + dio->range.n_sectors > le64_to_cpu(ic->sb->recalc_sector)) 2371 + dio->range.logical_sector + dio->range.n_sectors > recalc_sector) 2374 2372 goto skip_check; 2375 2373 if (ic->mode == 'B') { 2376 2374 if (!block_bitmap_op(ic, ic->recalc_bitmap, dio->range.logical_sector,