dvs services stop then qemu may be accesse null address case core
PATCH 1/1 dvs services stop then qemu may be accesse null address case core
From: "yin.zuowei" <[email protected]>
--- chardev/char-fe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
chardev/char-fe.c +7 -1
@@ -353,7 +353,13 @@ guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond,void qemu_chr_fe_disconnect (CharBackend *be) { -Chardev *chr = be->chr; +Chardev *chr =NULL ; + +if (be) { + chr = be->chr; + }else { +return ; + }if (chr &&CHARDEV_GET_CLASS (chr)->chr_disconnect) {CHARDEV_GET_CLASS (chr)->chr_disconnect (chr);
Signature · 1 line
1.8.3.1
No one replied to my mail. Someone might think I was talking nonsense. When the DVS service stopped, all our QEMU processes exited. DVS users complain that even if their DVS services are stopped, vhost-user networks should not be blocked, but virtual machines should not be allowed to exit. I found the segdefault error in the host's log about QEMU, and all errors are pointing to the null pointer referred to in the patch. What does open source maintenance staff think about?
Quoted 29 lines · At 2017-07-14 19:27:57, [email protected] wrote:
From: "yin.zuowei" <[email protected]>
Signed-off-by yin.zuowei <[email protected]>---
chardev/char-fe.c| 8 +++++++-1 file changed, 7 insertions(+), 1 deletion(-)chardev/char-fe.c +7
-1@@ -353,7 +353,13 @@ guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond,void qemu_chr_fe_disconnect (CharBackend *be) { -Chardev *chr = be->chr; +Chardev *chr =NULL ; + +if (be) { + chr = be->chr; + }else { +return ; + }if (chr &&CHARDEV_GET_CLASS (chr)->chr_disconnect) {CHARDEV_GET_CLASS (chr)->chr_disconnect (chr);Signature · 1 line
1.8.3.1
Hi
----- Original Message -----
Quoted 9 lines
No one replied to my mail. Someone might think I was talking nonsense. When the DVS service stopped, all our QEMU processes exited. DVS users complain that even if their DVS services are stopped, vhost-user networks should not be blocked, but virtual machines should not be allowed to exit. I found the segdefault error in the host's log about QEMU, and all errors are pointing to the null pointer referred to in the patch. What does open source maintenance staff think about?
You don't explain well how the crash happen. I don't even know what dvs service is.
Could you provide a description of how to reproduce the crash?
When there is a crash, it's good to also provide the backtrace.
Your patch may solve your problem, but there might be different (better) solutions, and we should try to cover this case in our tests.
thanks
Quoted 33 lines
Quoted 30 lines · At 2017-07-14 19:27:57, [email protected] wrote:
From: "yin.zuowei" <[email protected]>
Signed-off-by yin.zuowei <[email protected]>---
chardev/char-fe.c| 8 +++++++-1 file changed, 7 insertions(+), 1 deletion(-)chardev/char-fe.c +7
-1@@ -353,7 +353,13 @@ guint qemu_chr_fe_add_watch(CharBackend *be,GIOCondition cond, void qemu_chr_fe_disconnect(CharBackend *be) { - Chardev *chr = be->chr; + Chardev *chr = NULL; + +if (be) { + chr = be->chr; + }else { +return ; + }if (chr &&CHARDEV_GET_CLASS (chr)->chr_disconnect) {CHARDEV_GET_CLASS(chr)->chr_disconnect(chr);--
1.8.3.1