]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.111/crypto-cavium-zip-fix-collision-with-generic-cra_dri.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.111 / crypto-cavium-zip-fix-collision-with-generic-cra_dri.patch
1 From ee704ef85b33be27f4c590c8bdc966c07d873ab7 Mon Sep 17 00:00:00 2001
2 From: Eric Biggers <ebiggers@google.com>
3 Date: Sat, 23 Feb 2019 00:23:23 -0800
4 Subject: crypto: cavium/zip - fix collision with generic cra_driver_name
5
6 [ Upstream commit 41798036430015ad45137db2d4c213cd77fd0251 ]
7
8 The cavium/zip implementation of the deflate compression algorithm is
9 incorrectly being registered under the generic driver name, which
10 prevents the generic implementation from being registered with the
11 crypto API when CONFIG_CRYPTO_DEV_CAVIUM_ZIP=y. Similarly the lzs
12 algorithm (which does not currently have a generic implementation...)
13 is incorrectly being registered as lzs-generic.
14
15 Fix the naming collision by adding a suffix "-cavium" to the
16 cra_driver_name of the cavium/zip algorithms.
17
18 Fixes: 640035a2dc55 ("crypto: zip - Add ThunderX ZIP driver core")
19 Cc: Mahipal Challa <mahipalreddy2006@gmail.com>
20 Cc: Jan Glauber <jglauber@cavium.com>
21 Signed-off-by: Eric Biggers <ebiggers@google.com>
22 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 drivers/crypto/cavium/zip/zip_main.c | 6 ++++--
26 1 file changed, 4 insertions(+), 2 deletions(-)
27
28 diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c
29 index 1cd8aa488185..a6425a7afa7b 100644
30 --- a/drivers/crypto/cavium/zip/zip_main.c
31 +++ b/drivers/crypto/cavium/zip/zip_main.c
32 @@ -351,6 +351,7 @@ static struct pci_driver zip_driver = {
33
34 static struct crypto_alg zip_comp_deflate = {
35 .cra_name = "deflate",
36 + .cra_driver_name = "deflate-cavium",
37 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
38 .cra_ctxsize = sizeof(struct zip_kernel_ctx),
39 .cra_priority = 300,
40 @@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = {
41
42 static struct crypto_alg zip_comp_lzs = {
43 .cra_name = "lzs",
44 + .cra_driver_name = "lzs-cavium",
45 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
46 .cra_ctxsize = sizeof(struct zip_kernel_ctx),
47 .cra_priority = 300,
48 @@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = {
49 .decompress = zip_scomp_decompress,
50 .base = {
51 .cra_name = "deflate",
52 - .cra_driver_name = "deflate-scomp",
53 + .cra_driver_name = "deflate-scomp-cavium",
54 .cra_module = THIS_MODULE,
55 .cra_priority = 300,
56 }
57 @@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = {
58 .decompress = zip_scomp_decompress,
59 .base = {
60 .cra_name = "lzs",
61 - .cra_driver_name = "lzs-scomp",
62 + .cra_driver_name = "lzs-scomp-cavium",
63 .cra_module = THIS_MODULE,
64 .cra_priority = 300,
65 }
66 --
67 2.19.1
68