diff mbox

[4/6] sheepdog: don't leak socket file descriptor upon connection failure

Message ID 1337173681-25891-5-git-send-email-jim@meyering.net
State New
Headers show

Commit Message

Jim Meyering May 16, 2012, 1:07 p.m. UTC
From: Jim Meyering <meyering@redhat.com>


Signed-off-by: Jim Meyering <meyering@redhat.com>
---
 block/sheepdog.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kevin Wolf May 21, 2012, 11 a.m. UTC | #1
Am 16.05.2012 15:07, schrieb Jim Meyering:
> From: Jim Meyering <meyering@redhat.com>
> 
> 
> Signed-off-by: Jim Meyering <meyering@redhat.com>

Acked-by: Kevin Wolf <kwolf@redhat.com>
Jim Meyering Aug. 17, 2012, 1:30 p.m. UTC | #2
Kevin Wolf wrote:
> Am 16.05.2012 15:07, schrieb Jim Meyering:
>> From: Jim Meyering <meyering@redhat.com>
>>
>> Signed-off-by: Jim Meyering <meyering@redhat.com>
>
> Acked-by: Kevin Wolf <kwolf@redhat.com>

Hi Kevin,

AFAICS, only one of these 6 patches has been applied.
From what I recall (it's been nearly 3mo), there was good
feedback and I posted at least one V2 patch.
For reference, here's the start of the series:

    http://marc.info/?l=qemu-devel&m=133717388221635&w=2

Let me know if there's anything I can do to help.

Jim Meyering (5):
      qemu-ga: don't leak a file descriptor upon failed lockf
      linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure
      sheepdog: don't leak socket file descriptor upon connection failure
      arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN
      softmmu-semi: fix lock_user* functions not to deref NULL upon OOM

 block/sheepdog.c      |    1 +
 linux-user/syscall.c  |    4 ++--
 qemu-ga.c             |    3 +++
 softmmu-semi.h        |    5 ++++-
 target-arm/arm-semi.c |   13 +++++++------
 5 files changed, 17 insertions(+), 9 deletions(-)
Kevin Wolf Aug. 17, 2012, 1:40 p.m. UTC | #3
Am 17.08.2012 15:30, schrieb Jim Meyering:
> Kevin Wolf wrote:
>> Am 16.05.2012 15:07, schrieb Jim Meyering:
>>> From: Jim Meyering <meyering@redhat.com>
>>>
>>> Signed-off-by: Jim Meyering <meyering@redhat.com>
>>
>> Acked-by: Kevin Wolf <kwolf@redhat.com>
> 
> Hi Kevin,
> 
> AFAICS, only one of these 6 patches has been applied.
> From what I recall (it's been nearly 3mo), there was good
> feedback and I posted at least one V2 patch.
> For reference, here's the start of the series:
> 
>     http://marc.info/?l=qemu-devel&m=133717388221635&w=2
> 
> Let me know if there's anything I can do to help.

Oh, that's bad. This series is spreads across several subsystems, so by
acking the sheepdog patch (the only block layer one) I was intending to
signal that I'm okay with merging it, but that I expect a "global
maintainer" to actually commit it.

Did all your other series get merged? There were a lot more patches with
small fixes and I can't see them in git master at all. I seem to
remember that they got delayed because you posted them late during the
last freeze, but obviously they should have been long committed now.

Anthony, what happened with these series? I think it makes sense to pull
them into -rc1 because all of them were bug fixes, even though mostly
minor ones.

Kevin

> Jim Meyering (5):
>       qemu-ga: don't leak a file descriptor upon failed lockf
>       linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure
>       sheepdog: don't leak socket file descriptor upon connection failure
>       arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN
>       softmmu-semi: fix lock_user* functions not to deref NULL upon OOM
> 
>  block/sheepdog.c      |    1 +
>  linux-user/syscall.c  |    4 ++--
>  qemu-ga.c             |    3 +++
>  softmmu-semi.h        |    5 ++++-
>  target-arm/arm-semi.c |   13 +++++++------
>  5 files changed, 17 insertions(+), 9 deletions(-)
>
Jim Meyering Aug. 17, 2012, 1:42 p.m. UTC | #4
Kevin Wolf wrote:

> Am 17.08.2012 15:30, schrieb Jim Meyering:
>> Kevin Wolf wrote:
>>> Am 16.05.2012 15:07, schrieb Jim Meyering:
>>>> From: Jim Meyering <meyering@redhat.com>
>>>>
>>>> Signed-off-by: Jim Meyering <meyering@redhat.com>
>>>
>>> Acked-by: Kevin Wolf <kwolf@redhat.com>
>>
>> Hi Kevin,
>>
>> AFAICS, only one of these 6 patches has been applied.
>> From what I recall (it's been nearly 3mo), there was good
>> feedback and I posted at least one V2 patch.
>> For reference, here's the start of the series:
>>
>>     http://marc.info/?l=qemu-devel&m=133717388221635&w=2
>>
>> Let me know if there's anything I can do to help.
>
> Oh, that's bad. This series is spreads across several subsystems, so by
> acking the sheepdog patch (the only block layer one) I was intending to
> signal that I'm okay with merging it, but that I expect a "global
> maintainer" to actually commit it.
>
> Did all your other series get merged? There were a lot more patches with
> small fixes and I can't see them in git master at all. I seem to
> remember that they got delayed because you posted them late during the
> last freeze, but obviously they should have been long committed now.

I'm going through them now.
So far, it looks like most have been deferred.
diff mbox

Patch

diff --git a/block/sheepdog.c b/block/sheepdog.c
index e01d371..a5c834f 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -489,6 +489,7 @@  static int connect_to_sdog(const char *addr, const char *port)
             if (errno == EINTR) {
                 goto reconnect;
             }
+            close(fd);
             break;
         }