netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
	luto@kernel.org, baijiaju1990@163.com, nhorman@tuxdriver.com,
	vyasevich@gmail.com, kvalo@codeaurora.org,
	linux-crypto@vger.kernel.org, netdev@vger.kernel.org,
	linux-sctp@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned
Date: Thu, 5 Oct 2017 16:07:14 -0300	[thread overview]
Message-ID: <20171005190713.GA4326@localhost.localdomain> (raw)
In-Reply-To: <20171005131631.GA1553@gondor.apana.org.au>

On Thu, Oct 05, 2017 at 09:16:31PM +0800, Herbert Xu wrote:
> On Thu, Oct 05, 2017 at 06:16:20PM +0800, Herbert Xu wrote:
> >
> > That was my point.  Functions like sctp_pack_cookie shouldn't be
> > setting the key in the first place.  The setkey should happen at
> > the point when the key is generated.  That's sctp_endpoint_init
> > which AFAICS only gets called in GFP_KERNEL context.
> > 
> > Or is there a code-path where sctp_endpoint_init is called in
> > softirq context?
> 
> OK, there are indeed code paths where the key is derived in softirq
> context.  Notably sctp_auth_calculate_hmac.
> 
> So I think this patch is the correct fix and I will push it upstream
> as well as back to stable.

Okay, thanks.

  Marcelo

  reply	other threads:[~2017-10-05 19:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03  2:25 [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned Jia-Ju Bai
2017-10-03  4:18 ` Andy Lutomirski
     [not found]   ` <CALCETrWdXjTTTywbb3duCEsLYNxkeGx7bf3SM4PYKeErCyiUNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-03  5:26     ` Herbert Xu
2017-10-03 16:46       ` Andy Lutomirski
2017-10-03 22:45       ` Marcelo Ricardo Leitner
2017-10-05  3:40         ` Herbert Xu
     [not found]           ` <20171005034054.GB31996-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2017-10-05  4:37             ` David Miller
2017-10-05 10:16               ` Herbert Xu
     [not found]                 ` <20171005101620.GA1246-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2017-10-05 13:16                   ` Herbert Xu
2017-10-05 19:07                     ` Marcelo Ricardo Leitner [this message]
2017-10-03 22:33 ` Marcelo Ricardo Leitner
     [not found]   ` <20171003223308.GD19750-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-10-03 22:46     ` Marcelo Ricardo Leitner

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=20171005190713.GA4326@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kvalo@codeaurora.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.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 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).