summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_hpt3x3.c
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2023-07-26 16:59:45 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2023-07-29 18:05:25 +0300
commitbf672720e83cf04c007aa11c242229e70985135b (patch)
tree94c91773d3963f9041b363b9e1efd4640019de88 /drivers/ata/pata_hpt3x3.c
parentcff540ebef38303a4cabf4b8bb49317be01b4b0f (diff)
downloadlinux-bf672720e83cf04c007aa11c242229e70985135b.tar.xz
KVM: x86: check the kvm_cpu_get_interrupt result before using it
The code was blindly assuming that kvm_cpu_get_interrupt never returns -1 when there is a pending interrupt. While this should be true, a bug in KVM can still cause this. If -1 is returned, the code before this patch was converting it to 0xFF, and 0xFF interrupt was injected to the guest, which results in an issue which was hard to debug. Add WARN_ON_ONCE to catch this case and skip the injection if this happens again. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20230726135945.260841-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'drivers/ata/pata_hpt3x3.c')
0 files changed, 0 insertions, 0 deletions