netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: cpaasch@apple.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
	hannes@stressinduktion.org
Subject: Re: [PATCH net v2] tcp: Do not call tcp_fastopen_reset_cipher from interrupt context
Date: Tue, 23 Jun 2015 02:53:50 -0700 (PDT)	[thread overview]
Message-ID: <20150623.025350.1033684750230291393.davem@davemloft.net> (raw)
In-Reply-To: <1434644134-81335-1-git-send-email-cpaasch@apple.com>

From: Christoph Paasch <cpaasch@apple.com>
Date: Thu, 18 Jun 2015 09:15:34 -0700

> tcp_fastopen_reset_cipher really cannot be called from interrupt
> context. It allocates the tcp_fastopen_context with GFP_KERNEL and
> calls crypto_alloc_cipher, which allocates all kind of stuff with
> GFP_KERNEL.
> 
> Thus, we might sleep when the key-generation is triggered by an
> incoming TFO cookie-request which would then happen in interrupt-
> context, as shown by enabling CONFIG_DEBUG_ATOMIC_SLEEP:
 ...
> This patch moves the call to tcp_fastopen_init_key_once to the places
> where a listener socket creates its TFO-state, which always happens in
> user-context (either from the setsockopt, or implicitly during the
> listen()-call)
> 
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Fixes: 222e83d2e0ae ("tcp: switch tcp_fastopen key generation to net_get_random_once")
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2015-06-23  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 16:15 [PATCH net v2] tcp: Do not call tcp_fastopen_reset_cipher from interrupt context Christoph Paasch
2015-06-19  8:01 ` Eric Dumazet
2015-06-23  9:53 ` David Miller [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:
  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=20150623.025350.1033684750230291393.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cpaasch@apple.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).