From: Herbert Xu Date: Wed, 3 Feb 2016 13:39:26 +0000 (+0800) Subject: crypto: algif_skcipher - Do not dereference ctx without socket lock X-Git-Tag: v3.2.78~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c54ddfbb1b691d77c52b76ca6e13ca7082eb3b82;p=pandora-kernel.git crypto: algif_skcipher - Do not dereference ctx without socket lock commit 6454c2b83f719057069777132b13949e4c6b6350 upstream. Any access to non-constant bits of the private context must be done under the socket lock, in particular, this includes ctx->req. This patch moves such accesses under the lock, and fetches the tfm from the parent socket which is guaranteed to be constant, rather than from ctx->req. Signed-off-by: Herbert Xu [bwh: Backported to 3.2: - Drop changes to skcipher_recvmsg_async - s/skcipher/ablkcipher/ in many places - s/skc->skcipher/skc->base/] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed