From 865221f5aa31bfed1cc06da5815399c9d6c7ef90 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 27 Jan 2021 16:41:05 -0500 Subject: [PATCH] e2fsck: declare the size of bh->b_data to be 4096 in jfs_user.h When allocating buffer_heads in e2fsck and debugfs the actual size of the memory which is requested is based on the file system block size. So the actual size of b_data in struct buffer_head doesn't actually matter, except that it can triggers a UBSAN error when running the e2fsck regression test. So change it to be 4096 to avoid this false positive. Signed-off-by: Theodore Ts'o --- e2fsck/jfs_user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h index a1c6951cb..f07335595 100644 --- a/e2fsck/jfs_user.h +++ b/e2fsck/jfs_user.h @@ -51,7 +51,7 @@ struct buffer_head { unsigned int b_dirty:1; unsigned int b_uptodate:1; unsigned long long b_blocknr; - char b_data[1024]; + char b_data[4096]; }; struct inode { -- 2.47.2