From: Herbert Xu Date: Tue, 7 Apr 2015 13:27:01 +0000 (+0800) Subject: crypto: user - Fix crypto_alg_match race X-Git-Tag: omap-for-v4.1/fixes-rc1~140^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016baaa1183bb0c5fb2a7de42413bba8a51c1bc8;p=pandora-kernel.git crypto: user - Fix crypto_alg_match race The function crypto_alg_match returns an algorithm without taking any references on it. This means that the algorithm can be freed at any time, therefore all users of crypto_alg_match are buggy. This patch fixes this by taking a reference count on the algorithm to prevent such races. Signed-off-by: Herbert Xu --- Reading git-diff-tree failed