]> xenbits.xensource.com Git - xen.git/commit
memory: fix off-by-one in XSA-346 change
authorJan Beulich <jbeulich@suse.com>
Tue, 24 Nov 2020 13:01:31 +0000 (14:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Nov 2020 13:01:31 +0000 (14:01 +0100)
commit9b156bcc3ffcc7949edd4460b718a241e87ae302
tree1216275c014be4ba422631b5b6522168add4e502
parent8147e00e4fbfcc43b665dc6bf279b204c501ba04
memory: fix off-by-one in XSA-346 change

The comparison against ARRAY_SIZE() needs to be >= in order to avoid
overrunning the pages[] array.

This is XSA-355.

Fixes: 5777a3742d88 ("IOMMU: hold page ref until after deferred TLB flush")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/common/memory.c