() function) return -EPROBE_DEFER whem JRs are not yet
available (initialized).
Patches were developed and tested on v4.18-rc8.
Marcin Niestroj (2):
crypto: caam/jr - Fix race by statically initializing global data
crypto: caam - Support deferred probing in JR dependent drivers
drivers/crypto
caam_jr_alloc() always works on initialized variables.
Signed-off-by: Marcin Niestroj
---
drivers/crypto/caam/jr.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index f4f258075b89..1352a4875d5a 100644
It is possible, that caam_jr_alloc() is called before JR devices are
probed. Return -EPROBE_DEFER in drivers that rely on JR devices, so
they are probed at later stage.
Signed-off-by: Marcin Niestroj
---
drivers/crypto/caam/caamalg.c| 3 +++
drivers/crypto/caam/caamalg_qi.c | 3 +++
drivers