From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, kirill@shutemov.name,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [Qemu-devel] [PATCH] chardev: don't forget to set backend for mux
Date: Fri, 3 Nov 2017 16:19:59 +0300 [thread overview]
Message-ID: <20171103131959.73560-1-kirill.shutemov@linux.intel.com> (raw)
I noticied that on recent versions on QEMU I was not able to trigger
SysRq to invoke debug capabilites of Linux Kernel.
I've tracked it down to qemu_chr_be_event() ignoring CHR_EVENT_BREAK due
s->be being NULL.
Looks like the bug was introduced in a4afa548fc6d ("char: move front end
handlers in CharBackend"). Since the commit the qemu_chr_be_event()
failed to deliver CHR_EVENT_BREAK due to qemu_chr_fe_init() forgot to
get s->be initialized in case of mux.
Let's fix this.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fixes: a4afa548fc6d ("char: move front end handlers in CharBackend")
---
chardev/char-fe.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index ee6d59610031..d4a54947a567 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -209,9 +209,8 @@ bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp)
tag = d->mux_cnt++;
} else if (s->be) {
goto unavailable;
- } else {
- s->be = b;
}
+ s->be = b;
b->fe_open = false;
b->tag = tag;
--
2.14.2
next reply other threads:[~2017-11-03 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 13:19 Kirill A. Shutemov [this message]
2017-11-03 14:05 ` [Qemu-devel] [PATCH] chardev: don't forget to set backend for mux Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171103131959.73560-1-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).