From: Fabiano Rosas <farosas@suse.de>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] chardev: Don't unregister yank upon async path connection failure
Date: Wed, 03 Jun 2026 12:55:00 -0300 [thread overview]
Message-ID: <87v7bz7h63.fsf@suse.de> (raw)
In-Reply-To: <CAMxuvazV+hebpeerp=95K6MnvLuywyzZMnc7TUhZzeYmt7+ZpA@mail.gmail.com>
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> On Wed, Jun 3, 2026 at 6:11 PM Fabiano Rosas <farosas@suse.de> wrote:
>>
>> Commit 5c102ac9 ("chardev: Consolidate yank registration") has moved
>> yank registration in the tcp_chr_connect_client_async() path to after
>> the connection is successful. If qio_channel_socket_connect_sync()
>> fails early, there will be no yank registered to be unregistered in
>> the error path, leading to assert.
>>
>> Remove the now-extraneous unregister.
>>
>> Cc: qemu-stable@nongnu.org
>> Fixes: 5c102ac9 ("chardev: Consolidate yank registration")
>> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3528
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> chardev/char-socket.c | 5 -----
>> 1 file changed, 5 deletions(-)
>>
>> diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>> index e064b105c5..99e01a4875 100644
>> --- a/chardev/char-socket.c
>> +++ b/chardev/char-socket.c
>> @@ -1128,11 +1128,6 @@ static void qemu_chr_socket_connected(QIOTask *task, void *opaque)
>>
>> if (qio_task_propagate_error(task, &err)) {
>> tcp_chr_change_state(s, TCP_CHARDEV_STATE_DISCONNECTED);
>> - if (s->registered_yank) {
>
> Is "registered_yank" stalled too? shouldn't be set to false to avoid
> that path and possibly others?
>
No because registered_yank is about the YankInstance. There's no actual
tracking of the individual YankFns.
>> - yank_unregister_function(CHARDEV_YANK_INSTANCE(chr->label),
>> - char_socket_yank_iochannel,
>> - QIO_CHANNEL(sioc));
>> - }
>> check_report_connect_error(chr, err);
>> goto cleanup;
>> }
>> --
>> 2.53.0
>>
prev parent reply other threads:[~2026-06-03 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 14:11 [PATCH] chardev: Don't unregister yank upon async path connection failure Fabiano Rosas
2026-06-03 14:16 ` Marc-André Lureau
2026-06-03 15:55 ` Fabiano Rosas [this message]
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=87v7bz7h63.fsf@suse.de \
--to=farosas@suse.de \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.