dm-integrity: limit MAX_TAG_SIZE to 255
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 8 Sep 2025 13:52:02 +0000 (15:52 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 8 Sep 2025 13:57:04 +0000 (15:57 +0200)
commit77b8e6fbf9848d651f5cb7508f18ad0971f3ffdb
tree358722f4a97ea5653633fb2ae8d220910190188f
parent1071d560afb4c245c2076494226df47db5a35708
dm-integrity: limit MAX_TAG_SIZE to 255

MAX_TAG_SIZE was 0x1a8 and it may be truncated in the "bi->metadata_size
= ic->tag_size" assignment. We need to limit it to 255.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-integrity.c