All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <gqjiang@suse.com>
To: sowmini.varadhan@oracle.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, Guoqing Jiang <gqjiang@suse.com>
Subject: WARN_ON in commit 0ffdaf5 "net/sock: add WARN_ON(parent->sk) in sock_graft()"
Date: Fri, 4 Aug 2017 19:13:18 +0800	[thread overview]
Message-ID: <598456CE.7020702@suse.com> (raw)

HI,

With commit 0ffdaf5b41cf4435ece14d1d3e977ce69012a20d "net/sock: add 
WARN_ON(parent->sk) in sock_graft()",
I can see the WARN_ON is triggered easily by dlm subsystem.

tcp_accept_from_sock() in  fs/dlm/lowcomms.c has the following snippet:

1.    result = sock_create_kern(&init_net, dlm_local_addr[0]->ss_family,
                                       SOCK_STREAM, IPPROTO_TCP, &newsock);
         sk is set by the path "sock_create_kern -> __sock_creat -> 
pf->create => inet_create -> sock_init_data"
     ...
2.    result = con->sock->ops->accept(con->sock, newsock, O_NONBLOCK, true);
         Then sock_graft is called by "con->sock->ops->accept => 
inet_accept -> sock_graft "

Does it mean call accept() after the just created socket is not a 
acceptable behavior? Any comment will be appreciate, thanks.

Regards,
Guoqing

             reply	other threads:[~2017-08-04 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 11:13 Guoqing Jiang [this message]
2017-08-04 11:19 ` WARN_ON in commit 0ffdaf5 "net/sock: add WARN_ON(parent->sk) in sock_graft()" Sowmini Varadhan

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=598456CE.7020702@suse.com \
    --to=gqjiang@suse.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sowmini.varadhan@oracle.com \
    /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 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.