Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 6b74fdcc authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: bch2_checksum() returns 0 for unknown checksum type


This fixes missing guards on trying to calculate a checksum with an
invalid/unknown checksum type; moving the guards up to e.g. btree_io.c
might be "more correct", but doesn't buy us anything - an unknown
checksum type will always be flagged as at least a checksum error so we
aren't losing any safety doing it this way and it makes it less likely
to accidentally pop an assert we don't want.

Reported-by: default avatar <syzbot+e951ad5349f3a34a715a@syzkaller.appspotmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent c06a8b75
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment