[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150623.025350.1033684750230291393.davem@davemloft.net>
Date: Tue, 23 Jun 2015 02:53:50 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: cpaasch@...le.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
hannes@...essinduktion.org
Subject: Re: [PATCH net v2] tcp: Do not call tcp_fastopen_reset_cipher from
interrupt context
From: Christoph Paasch <cpaasch@...le.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@...il.com>
> Cc: Hannes Frederic Sowa <hannes@...essinduktion.org>
> Fixes: 222e83d2e0ae ("tcp: switch tcp_fastopen key generation to net_get_random_once")
> Signed-off-by: Christoph Paasch <cpaasch@...le.com>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists