crypto: msm: Fix kmalloc() with GFP_KERNEL flag issue in irq.

There exists scenarios where packet processing is done in softirq
which runs in interrupt context. Blocking call is not allowed in
interrupt context. The qcrypto driver tries to allocate memory in
several places, and some of them were done in interrupt context.

In some cases, to meet the alignment requirement of some versions
of Crypto5 engine, _copy_source() is called that  make a copy of
the data. This calls kmalloc() with GFP_KERNEL flag. This flag cannot
be used in interrupt context since the caller may get blocked until
the kernel finds requested memory.

To avoid this, all the memory allocation requests in interrupt context
were changed to use GFP_ATOMIC flag instead.

Change-Id: I3b86af00f3d7737c38b94e748ae083f58576dda5
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
1 file changed