Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buffer overrun in viostor when VM is configured to have
more disk queues than number of CPUs. The memory buffer length viostor allocates to store the group affinity mask is based on the num_queues but the last redirection message number is based on msix_vectors. If msix_vectors is greater than num_queues, storport will write beyond the end of the allocated buffer which causes non-paged pool corruption. This change fixes the explained problem. 1. Set last redirection message number based on num_queues in viostor. 2. Add a field num_affinity in ADAPTER_EXTENSION to store the group affinity array length. 3. Add assertion in viostor to ensure that last redirection message number is less than num_affinity. Signed-off-by: Hao Xiang <[email protected]>
- Loading branch information