Re: [PATCH v2 1/8] s390/vfio-ap: Fix stale do_remove flag across iterations in vfio_ap_mdev_cfg_remove

Matthew Rosato <[email protected]>
Newsgroups org.kernel.vger.linux-s390,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On 8/10/26 3:22 PM, Anthony Krowiak wrote:
> The do_remove flag in vfio_ap_mdev_cfg_remove() is initialised to zero
> before the loop that iterates over the list of matrix mdevs, but is
> never reset at the start of each iteration. Since do_remove is
> OR-accumulated across iterations, a positive result from one mdev
> carries over to subsequent mdevs.
> 
> The fix is to set the do_remove flag with the first call to bitmap_and;
> for example: do_remove = bitmap_an rather than do_remove |= bitmap_and.
> 
> Fixes: eeb386aeb5b7 ("s390/vfio-ap: handle config changed and scan complete notification")
> Cc: [email protected]
> Signed-off-by: Anthony Krowiak <[email protected]>

Reviewed-by: Matthew Rosato <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.