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. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt