QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect
@ 2020-03-26 14:05 Janosch Frank
  2020-03-26 16:55 ` Cornelia Huck
  2020-03-27  9:15 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Janosch Frank @ 2020-03-26 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: borntraeger, qemu-s390x, cohuck, david

In case the protection of the machine fails at s390_pv_vm_enable(),
we'll currently report the local_error variable. Problem is that
there's no migration blocker error that we can report at this point so
the pointer is always NULL which leads to a SEGFAULT.

Let's remove the error report.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Fixes: 520935eedf941da3 ("s390x: protvirt: Add migration blocker")
---
 hw/s390x/s390-virtio-ccw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3cf19c99f3468b7d..855ecf370d6e82fa 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -358,7 +358,6 @@ static int s390_machine_protect(S390CcwMachineState *ms)
     rc = s390_pv_vm_enable();
     if (rc) {
         qemu_balloon_inhibit(false);
-        error_report_err(local_err);
         migrate_del_blocker(pv_mig_blocker);
         error_free_or_abort(&pv_mig_blocker);
         return rc;
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect
  2020-03-26 14:05 [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect Janosch Frank
@ 2020-03-26 16:55 ` Cornelia Huck
  2020-03-27  9:15 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2020-03-26 16:55 UTC (permalink / raw)
  To: Janosch Frank; +Cc: borntraeger, qemu-s390x, qemu-devel, david

On Thu, 26 Mar 2020 10:05:05 -0400
Janosch Frank <frankja@linux.ibm.com> wrote:

> In case the protection of the machine fails at s390_pv_vm_enable(),
> we'll currently report the local_error variable. Problem is that
> there's no migration blocker error that we can report at this point so
> the pointer is always NULL which leads to a SEGFAULT.
> 
> Let's remove the error report.

Yes, s390_pvm_vm_enable() will already moan on error.

> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Fixes: 520935eedf941da3 ("s390x: protvirt: Add migration blocker")

Note to self: update commit ID before I send a pull request (I will at
least need to rebase for a headers update...)

> ---
>  hw/s390x/s390-virtio-ccw.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 3cf19c99f3468b7d..855ecf370d6e82fa 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -358,7 +358,6 @@ static int s390_machine_protect(S390CcwMachineState *ms)
>      rc = s390_pv_vm_enable();
>      if (rc) {
>          qemu_balloon_inhibit(false);
> -        error_report_err(local_err);
>          migrate_del_blocker(pv_mig_blocker);
>          error_free_or_abort(&pv_mig_blocker);
>          return rc;

Thanks, applied.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect
  2020-03-26 14:05 [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect Janosch Frank
  2020-03-26 16:55 ` Cornelia Huck
@ 2020-03-27  9:15 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2020-03-27  9:15 UTC (permalink / raw)
  To: Janosch Frank, qemu-devel; +Cc: borntraeger, qemu-s390x, cohuck

On 26.03.20 15:05, Janosch Frank wrote:
> In case the protection of the machine fails at s390_pv_vm_enable(),
> we'll currently report the local_error variable. Problem is that
> there's no migration blocker error that we can report at this point so
> the pointer is always NULL which leads to a SEGFAULT.
> 
> Let's remove the error report.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Fixes: 520935eedf941da3 ("s390x: protvirt: Add migration blocker")
> ---
>  hw/s390x/s390-virtio-ccw.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 3cf19c99f3468b7d..855ecf370d6e82fa 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -358,7 +358,6 @@ static int s390_machine_protect(S390CcwMachineState *ms)
>      rc = s390_pv_vm_enable();
>      if (rc) {
>          qemu_balloon_inhibit(false);
> -        error_report_err(local_err);
>          migrate_del_blocker(pv_mig_blocker);
>          error_free_or_abort(&pv_mig_blocker);
>          return rc;
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 14:05 [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect Janosch Frank
2020-03-26 16:55 ` Cornelia Huck
2020-03-27  9:15 ` David Hildenbrand

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git