summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-09-12 11:13:24 +0200
committerDavid Sterba <dsterba@suse.com>2016-09-21 11:50:05 +0200
commitda64ae3a0f7498e356a72e7f1b65a704ddfbb6bc (patch)
tree86c0454b8a160700ddd78767ebdc086284592774 /ctree.h
parentf9309584bf9c58054d588077ba51d8123df54571 (diff)
btrfs-progs: reorganize extent_buffer and fix alignment of data
Reported by UBSAN, the checksum code tries to access unaligned data that come from the extent_buffer. struct extent_buffer { struct cache_extent cache_node; /* 0 48 */ u64 start; /* 48 8 */ u64 dev_bytenr; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 len; /* 64 4 */ /* XXX 4 bytes hole, try to pack */ struct extent_io_tree * tree; /* 72 8 */ struct list_head lru; /* 80 16 */ struct list_head recow; /* 96 16 */ int refs; /* 112 4 */ u32 flags; /* 116 4 */ int fd; /* 120 4 */ char data[0]; /* 124 0 */ /* size: 128, cachelines: 2, members: 11 */ /* sum members: 120, holes: 1, sum holes: 4 */ /* padding: 4 */ }; Add explicit alignment to data. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156471 Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.h')
0 files changed, 0 insertions, 0 deletions