]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: fix logic bug in integrity tag testing
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 3 Apr 2020 17:05:50 +0000 (13:05 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 3 Apr 2020 17:07:41 +0000 (13:07 -0400)
commit4b43ce2af6f60fb0c37595233586227628d5de08
tree3462cb434ed814e3186fa90efdc51077dae36098
parent3c19460f4e9a541c6c4e31b8ff11b70462c96963
dm integrity: fix logic bug in integrity tag testing

If all the bytes are equal to DISCARD_FILLER, we want to accept the
buffer. If any of the bytes are different, we must do thorough
tag-by-tag checking.

The condition was inverted.

Fixes: 35e889e8e62e ("dm integrity: add optional discard support")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c