[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 01/66] pseries: Add cleanup hook for PAPR virtual LAN
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 01/66] pseries: Add cleanup hook for PAPR virtual LAN device |
Date: |
Fri, 8 Mar 2013 21:06:03 +0100 |
From: David Gibson <address@hidden>
Currently the spapr-vlan device does not supply a cleanup call for its
NetClientInfo structure. With current qemu versions, that leads to a SEGV
on exit, when net_cleanup() attempts to call the cleanup handlers on all
net clients.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr_llan.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/spapr_llan.c b/hw/spapr_llan.c
index 6ef2936..0ace2eb 100644
--- a/hw/spapr_llan.c
+++ b/hw/spapr_llan.c
@@ -175,11 +175,19 @@ static ssize_t spapr_vlan_receive(NetClientState *nc,
const uint8_t *buf,
return size;
}
+static void spapr_vlan_cleanup(NetClientState *nc)
+{
+ VIOsPAPRVLANDevice *dev = qemu_get_nic_opaque(nc);
+
+ dev->nic = NULL;
+}
+
static NetClientInfo net_spapr_vlan_info = {
.type = NET_CLIENT_OPTIONS_KIND_NIC,
.size = sizeof(NICState),
.can_receive = spapr_vlan_can_receive,
.receive = spapr_vlan_receive,
+ .cleanup = spapr_vlan_cleanup,
};
static void spapr_vlan_reset(VIOsPAPRDevice *sdev)
--
1.6.0.2
- [Qemu-ppc] [PATCH 15/66] target-ppc: Extract 74x5 as aliases, (continued)
- [Qemu-ppc] [PATCH 15/66] target-ppc: Extract 74x5 as aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 29/66] target-ppc: Extract e500v1/e500v2 aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 32/66] target-ppc: Extract e200 alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 14/66] target-ppc: Extract 74x7[A] aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 33/66] target-ppc: Extract MPC82xx alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 22/66] target-ppc: Extract 750 aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 24/66] target-ppc: Extract 603e alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 31/66] target-ppc: Extract e300 alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 42/66] target-ppc: Extract POWER7 alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 39/66] target-ppc: Extract MPC8240 alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 01/66] pseries: Add cleanup hook for PAPR virtual LAN device,
Alexander Graf <=
- [Qemu-ppc] [PATCH 30/66] target-ppc: Extract MPC83xx aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 40/66] target-ppc: Extract 405GPe alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 38/66] target-ppc: Extract MPC5200/MPC5200B aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 47/66] target-ppc: Register all types for TARGET_PPCEMB, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 41/66] target-ppc: Extract 970 aliases, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 35/66] target-ppc: Extract MPC82xx aliases to *_HiP4, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 54/66] target-ppc: Change "POWER7" CPU alias, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 59/66] target-ppc: Fix PPC_DUMP_SPR_ACCESS build, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 43/66] target-ppc: Get model name from type name, Alexander Graf, 2013/03/08
- [Qemu-ppc] [PATCH 28/66] target-ppc: Extract MPC85xx aliases, Alexander Graf, 2013/03/08