All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@redhat.com>
To: eric.dumazet@gmail.com
Cc: mleitner@redhat.com, edumazet@google.com, netdev@vger.kernel.org,
	ycheng@google.com, mattmathis@google.com, cgallek@google.com,
	kafai@fb.com
Subject: Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()
Date: Fri, 22 May 2015 13:50:42 -0400 (EDT)	[thread overview]
Message-ID: <20150522.135042.1383929510137041615.davem@redhat.com> (raw)
In-Reply-To: <1432270279.4060.128.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 21 May 2015 21:51:19 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> Taking socket spinlock in tcp_get_info() can deadlock, as
> inet_diag_dump_icsk() holds the &hashinfo->ehash_locks[i],
> while packet processing can use the reverse locking order.
> 
> We could avoid this locking for TCP_LISTEN states, but lockdep would
> certainly get confused as all TCP sockets share same lockdep classes.
 ...
> Lets use u64_sync infrastructure instead. As a bonus, 64bit
> arches get optimized, as these are nop for them.
> 
> Fixes: 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

This bug exists in 'net' so I've applied it there.

Thanks Eric.

  reply	other threads:[~2015-05-22 17:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 22:28 [PATCH v2 net-next 0/2] tcp: tcp_info extensions Eric Dumazet
2015-04-28 22:28 ` [PATCH v2 net-next 1/2] tcp: add tcpi_bytes_acked to tcp_info Eric Dumazet
2015-04-29 22:12   ` David Miller
2015-04-28 22:28 ` [PATCH v2 net-next 2/2] tcp: add tcpi_bytes_received " Eric Dumazet
2015-04-28 22:56   ` Yuchung Cheng
2015-04-28 23:07     ` Eric Dumazet
2015-04-29 22:12   ` David Miller
2015-05-12 13:08 ` [PATCH v2 net-next 0/2] tcp: tcp_info extensions Marcelo Ricardo Leitner
2015-05-12 20:31   ` Eric Dumazet
2015-05-12 22:21     ` Marcelo Ricardo Leitner
2015-05-20 23:35     ` [PATCH net-next] tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info Eric Dumazet
2015-05-21  0:06       ` Rick Jones
2015-05-21  0:37         ` Eric Dumazet
2015-05-21  0:48           ` Rick Jones
2015-05-21  0:52             ` Eric Dumazet
2015-05-21 12:38               ` Marcelo Ricardo Leitner
2015-05-21 19:41       ` Yuchung Cheng
2015-05-21 20:06         ` Eric Dumazet
2015-05-21 21:53         ` Marcelo Ricardo Leitner
2015-05-22  3:25       ` David Miller
2015-05-22  3:43         ` Eric Dumazet
2015-05-22  4:51           ` [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info() Eric Dumazet
2015-05-22 17:50             ` David Miller [this message]
2015-05-22 17:56               ` Eric Dumazet
2015-05-22 18:03                 ` Eric Dumazet
2015-05-22 18:08                   ` Eric Dumazet
2015-05-22 18:21                     ` David Miller
2015-05-22 18:12                 ` David Miller

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=20150522.135042.1383929510137041615.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=cgallek@google.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kafai@fb.com \
    --cc=mattmathis@google.com \
    --cc=mleitner@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.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.