From: Laurent Vivier <laurent@vivier.eu>
To: Markus Armbruster <armbru@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-trivial@nongnu.org,
Claudio Fontana <claudio.fontana@suse.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] ivshmem-server: Clean up shmem on shutdown
Date: Tue, 12 Nov 2019 10:36:26 +0100 [thread overview]
Message-ID: <d18914f3-6760-ff6a-3914-956856b4ccdf@vivier.eu> (raw)
In-Reply-To: <87eeyi8kny.fsf@dusky.pond.sub.org>
Le 08/11/2019 à 16:14, Markus Armbruster a écrit :
> Jan Kiszka <jan.kiszka@siemens.com> writes:
>
>> On 06.08.19 15:01, Claudio Fontana wrote:
>>> On 8/5/19 7:54 AM, Jan Kiszka wrote:
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> So far, the server leaves the posix shared memory object behind when
>>>> terminating, requiring the user to explicitly remove it in order to
>>>> start a new instance.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - respect use_shm_open
>>>> - also clean up in ivshmem_server_start error path
>>>>
>>>> contrib/ivshmem-server/ivshmem-server.c | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c
>>>> index 77f97b209c..88daee812d 100644
>>>> --- a/contrib/ivshmem-server/ivshmem-server.c
>>>> +++ b/contrib/ivshmem-server/ivshmem-server.c
>>>> @@ -353,6 +353,9 @@ ivshmem_server_start(IvshmemServer *server)
>>>> err_close_sock:
>>>> close(sock_fd);
>>>> err_close_shm:
>>>> + if (server->use_shm_open) {
>>>> + shm_unlink(server->shm_path);
>>>> + }
>>>> close(shm_fd);
>>>> return -1;
>>>> }
>>>> @@ -370,6 +373,9 @@ ivshmem_server_close(IvshmemServer *server)
>>>> }
>>>>
>>>> unlink(server->unix_sock_path);
>>>> + if (server->use_shm_open) {
>>>> + shm_unlink(server->shm_path);
>>>> + }
>>>> close(server->sock_fd);
>>>> close(server->shm_fd);
>>>> server->sock_fd = -1;
>>>> --
>>>> 2.16.4
>>>>
>>>>
>>>
>>> Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
>>
>> Markus, would you take this?
>
> ivshmem has no maintainer. I you need me to serve as a pull request
> monkey of last resort, I can do that. However, for this one,
> qemu-trivial (cc'ed) should do.
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
prev parent reply other threads:[~2019-11-12 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 5:54 [Qemu-devel] [PATCH v2] ivshmem-server: Clean up shmem on shutdown Jan Kiszka
2019-08-06 13:01 ` Claudio Fontana
2019-11-08 9:08 ` Jan Kiszka
2019-11-08 15:14 ` Markus Armbruster
2019-11-12 9:36 ` Laurent Vivier [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=d18914f3-6760-ff6a-3914-956856b4ccdf@vivier.eu \
--to=laurent@vivier.eu \
--cc=armbru@redhat.com \
--cc=claudio.fontana@suse.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).