Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e1132e

Browse files
Mikulas Patockasnitm
Mikulas Patocka
authored andcommitted
dm writecache: fix a crash due to reading past end of dirty_bitmap
wc->dirty_bitmap_size is in bytes so must multiply it by 8, not byBITS_PER_LONG, to get number of bitmap_bits.Fixes crash in find_next_bit() that was reported:https://bugzilla.kernel.org/show_bug.cgi?id=200819Reported-by: edo.rus@gmail.comFixes:48debaf ("dm: add writecache target")Cc: stable@vger.kernel.org # 4.18Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parentbc9e9cf commit1e1132e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎drivers/md/dm-writecache.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static void ssd_commit_flushed(struct dm_writecache *wc)
457457
COMPLETION_INITIALIZER_ONSTACK(endio.c),
458458
ATOMIC_INIT(1),
459459
};
460-
unsignedbitmap_bits=wc->dirty_bitmap_size*BITS_PER_LONG;
460+
unsignedbitmap_bits=wc->dirty_bitmap_size*8;
461461
unsignedi=0;
462462

463463
while (1) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp