[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 for-4.2] monitor/qmp: resume monitor when clearing its que
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH v3 for-4.2] monitor/qmp: resume monitor when clearing its queue |
|
Date: |
Tue, 19 Nov 2019 08:20:58 +0100 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Wolfgang Bumiller <address@hidden> writes:
> When a monitor's queue is filled up in handle_qmp_command()
> it gets suspended. It's the dispatcher bh's job currently to
> resume the monitor, which it does after processing an event
> from the queue. However, it is possible for a
> CHR_EVENT_CLOSED event to be processed before before the bh
> is scheduled, which will clear the queue without resuming
> the monitor, thereby preventing the dispatcher from reaching
> the resume() call.
> Any new connections to the qmp socket will be accept()ed and
> show the greeting, but will not respond to any messages sent
> afterwards (as they will not be read from the
> still-suspended socket).
> Fix this by resuming the monitor when clearing a queue which
> was filled up.
>
> Signed-off-by: Wolfgang Bumiller <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
I'm going to prepare a pull request for today's -rc2.