Skip to contentSkip to conversation

xen/debugtrace: fix buffer allocation

PATCH In review Juergen Gross 2 participants 2 messages Sep 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/debugtrace: fix buffer allocation

Commit 6338c9ead9ff9ef6 ("debugtrace: add per-cpu buffer option") had a rebase error when using per-cpu buffers: the global buffer address would always be set to the one of the last per-cpu buffer allocated.

The result would be that when dumping the buffers the last cpu's buffer is always shown as empty as those entries are printed in the global buffer's dump already.

Fix that.

---
 xen/common/debugtrace.c | 1 -
 1 file changed, 1 deletion(-)
xen/common/debugtrace.c +0 -1
index 7313e89389..a788e55b4c 100644
@@ -259,7 +259,6 @@ static void debugtrace_alloc_buffer(struct debugtrace_data **ptr,
 
     memset(data, '\0', debugtrace_bytes + sizeof(*data));
 
-    dt_data = data;
     *ptr = data;
 }
 
Signature · 7 lines
2.16.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Juergen Gross

Commit 6338c9ead9ff9ef6 ("debugtrace: add per-cpu buffer option") had a rebase error when using per-cpu buffers: the global buffer address would always be set to the one of the last per-cpu buffer allocated.

The result would be that when dumping the buffers the last cpu's buffer is always shown as empty as those entries are printed in the global buffer's dump already.

Fix that.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel