All of
 help / color / mirror / Atom feed
From: Petr Vorel <>
Subject: [LTP] [PATCH v2] syscalls/bind03: Bugfix for running with option "-i"
Date: Mon, 10 May 2021 19:15:08 +0200	[thread overview]
Message-ID: <YJlqHBd+OVdqwEke@pevik> (raw)
In-Reply-To: <YJlJNdi039jziyCp@yuki>


> Hi!
> I was looking at the test wondering why do you try to unlink socket that
> wasn't bind properly and it looks like kernel creates the socket even in
> a case that the bind fails, which is strange and I would call it a bug.

> Looking at the kernel code it indeed does mknod before it takes locks
> and checks the socket. Even more it turns out that there is in-flight
> patchset that is fixing this:


> Anyways for now moved the code initializing the sockets into a setup()
> function and the only call that had to stay in the run() function is the
> unlink(SNAME_B); with a comment that kernel is buggy.

> And we will have to write a regression test for this bug once upstream
> kernel is fixed.

> Also note that I use unlink() here since the test will fail otherwise
> once kernel is fixed and there is no socket to be unlinked.

FYI I created issue #817 for it, feel free to improve the description.

Kind regards,

      reply	other threads:[~2021-05-10 17:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  2:14 Zhao Gongyi
2021-05-10 14:54 ` Cyril Hrubis
2021-05-10 17:15   ` Petr Vorel [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJlqHBd+OVdqwEke@pevik \ \ \
    --subject='Re: [LTP] [PATCH v2] syscalls/bind03: Bugfix for running with option "-i"' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.