[RFC PATCH 2/2] crypto: caam - fix k*alloc if called from own cipher callback

2017-06-02 Thread David Gstir
There are cases (e.g. the cts mode) where a cipher can be called again from its own callback. In our case this callback is executed from within a tasklet in the jobring, we must not sleep when allocating memory. This patch detects such cases by using in_interrupt() to properly set the k*alloc

[RFC PATCH 2/2] crypto: caam - fix k*alloc if called from own cipher callback

2017-06-02 Thread David Gstir
There are cases (e.g. the cts mode) where a cipher can be called again from its own callback. In our case this callback is executed from within a tasklet in the jobring, we must not sleep when allocating memory. This patch detects such cases by using in_interrupt() to properly set the k*alloc