* [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments
@ 2017-03-14 16:12 Fam Zheng
2017-03-14 16:17 ` Kevin Wolf
2017-03-14 16:20 ` Eric Blake
0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2017-03-14 16:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Kevin Wolf, Max Reitz, qemu-block
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/file-posix.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index c4c0663..d670be3 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -703,6 +703,9 @@ static int hdev_get_max_segments(const struct stat *st)
}
out:
+ if (fd != -1) {
+ close(fd);
+ }
g_free(sysfspath);
return ret;
#else
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments
2017-03-14 16:12 [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments Fam Zheng
@ 2017-03-14 16:17 ` Kevin Wolf
2017-03-14 16:20 ` Eric Blake
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2017-03-14 16:17 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, Paolo Bonzini, Max Reitz, qemu-block
Am 14.03.2017 um 17:12 hat Fam Zheng geschrieben:
> Signed-off-by: Fam Zheng <famz@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments
2017-03-14 16:12 [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments Fam Zheng
2017-03-14 16:17 ` Kevin Wolf
@ 2017-03-14 16:20 ` Eric Blake
2017-03-14 16:28 ` Kevin Wolf
1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2017-03-14 16:20 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, qemu-block, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
On 03/14/2017 11:12 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/file-posix.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index c4c0663..d670be3 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -703,6 +703,9 @@ static int hdev_get_max_segments(const struct stat *st)
> }
>
> out:
> + if (fd != -1) {
> + close(fd);
> + }
Mails crossed - I see I asked about this in reply to v1 after you
already sent v2 minutes earlier.
I still think it might be nice to mention a commit id that you are
fixing (one of my reply-to-self on your v1), but either way,
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments
2017-03-14 16:20 ` Eric Blake
@ 2017-03-14 16:28 ` Kevin Wolf
2017-03-14 17:12 ` Eric Blake
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2017-03-14 16:28 UTC (permalink / raw)
To: Eric Blake; +Cc: Fam Zheng, qemu-devel, Paolo Bonzini, qemu-block, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
Am 14.03.2017 um 17:20 hat Eric Blake geschrieben:
> On 03/14/2017 11:12 AM, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> > block/file-posix.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/block/file-posix.c b/block/file-posix.c
> > index c4c0663..d670be3 100644
> > --- a/block/file-posix.c
> > +++ b/block/file-posix.c
> > @@ -703,6 +703,9 @@ static int hdev_get_max_segments(const struct stat *st)
> > }
> >
> > out:
> > + if (fd != -1) {
> > + close(fd);
> > + }
>
> Mails crossed - I see I asked about this in reply to v1 after you
> already sent v2 minutes earlier.
>
> I still think it might be nice to mention a commit id that you are
> fixing (one of my reply-to-self on your v1), but either way,
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
I added a sentence to the commit message: "This fixes a leaked fd
introduced in commit 9103f1ce." Sounds good?
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments
2017-03-14 16:28 ` Kevin Wolf
@ 2017-03-14 17:12 ` Eric Blake
0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2017-03-14 17:12 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Fam Zheng, qemu-devel, Paolo Bonzini, qemu-block, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On 03/14/2017 11:28 AM, Kevin Wolf wrote:
> Am 14.03.2017 um 17:20 hat Eric Blake geschrieben:
>> On 03/14/2017 11:12 AM, Fam Zheng wrote:
>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>> ---
>>> block/file-posix.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/block/file-posix.c b/block/file-posix.c
>>> index c4c0663..d670be3 100644
>>> --- a/block/file-posix.c
>>> +++ b/block/file-posix.c
>>> @@ -703,6 +703,9 @@ static int hdev_get_max_segments(const struct stat *st)
>>> }
>>>
>>> out:
>>> + if (fd != -1) {
>>> + close(fd);
>>> + }
>>
>> Mails crossed - I see I asked about this in reply to v1 after you
>> already sent v2 minutes earlier.
>>
>> I still think it might be nice to mention a commit id that you are
>> fixing (one of my reply-to-self on your v1), but either way,
>>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> I added a sentence to the commit message: "This fixes a leaked fd
> introduced in commit 9103f1ce." Sounds good?
Works for me!
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-14 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 16:12 [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments Fam Zheng
2017-03-14 16:17 ` Kevin Wolf
2017-03-14 16:20 ` Eric Blake
2017-03-14 16:28 ` Kevin Wolf
2017-03-14 17:12 ` Eric Blake
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.