From: Herbert Xu Date: Fri, 8 Jan 2016 13:31:04 +0000 (+0800) Subject: crypto: algif_hash - Require setkey before accept(2) X-Git-Tag: v3.2.77~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d4c935b8a1ea8bb0efed11b204de06f96fdb6b1;p=pandora-kernel.git crypto: algif_hash - Require setkey before accept(2) commit 6de62f15b581f920ade22d758f4c338311c2f0d4 upstream. Hash implementations that require a key may crash if you use them without setting a key. This patch adds the necessary checks so that if you do attempt to use them without a key that we return -ENOKEY instead of proceeding. This patch also adds a compatibility path to support old applications that do acept(2) before setkey. Signed-off-by: Herbert Xu [bwh: Backported to 3.2: - Add struct kiocb * parameter to {recv,send}msg ops - Adjust context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed