diff mbox series

msix: unset PCIDevice::msix_vector_poll_notifier in rollback

Message ID 20231113081349.1307-1-robert.hoo.linux@gmail.com (mailing list archive)
State New, archived
Headers show
Series msix: unset PCIDevice::msix_vector_poll_notifier in rollback | expand

Commit Message

Robert Hoo Nov. 13, 2023, 8:13 a.m. UTC
In the rollback in msix_set_vector_notifiers(), original patch forgot to
undo msix_vector_poll_notifier pointer.

Fixes: bbef882cc193 ("msi: add API to get notified about pending bit poll")
Signed-off-by: Robert Hoo <robert.hoo.linux@gmail.com>
---
 hw/pci/msix.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé Nov. 13, 2023, 10:05 a.m. UTC | #1
Hi Robert,

On 13/11/23 09:13, Robert Hoo wrote:
> In the rollback in msix_set_vector_notifiers(), original patch forgot to
> undo msix_vector_poll_notifier pointer.

Out of curiosity, nobody complained during 11 years, so in which
use case did you notice this?

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Fixes: bbef882cc193 ("msi: add API to get notified about pending bit poll")
> Signed-off-by: Robert Hoo <robert.hoo.linux@gmail.com>
> ---
>   hw/pci/msix.c | 1 +
>   1 file changed, 1 insertion(+)
Robert Hoo Nov. 13, 2023, 1:03 p.m. UTC | #2
On 11/13/2023 6:05 PM, Philippe Mathieu-Daudé wrote:
> Hi Robert,
> 
> On 13/11/23 09:13, Robert Hoo wrote:
>> In the rollback in msix_set_vector_notifiers(), original patch forgot to
>> undo msix_vector_poll_notifier pointer.
> 
> Out of curiosity, nobody complained during 11 years, so in which
> use case did you notice this?
> 

Hi Philippe,

I stumbled upon this when looking into another issue.

I think, thanks to the caller's very standardized use, the omission has never 
been exposed.
diff mbox series

Patch

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index ab8869d9d0..cd817f4ca8 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -648,6 +648,7 @@  undo:
     }
     dev->msix_vector_use_notifier = NULL;
     dev->msix_vector_release_notifier = NULL;
+    dev->msix_vector_poll_notifier = NULL;
     return ret;
 }