Anyway, crypto_alloc_skcipher() takes a lock (crypto_alg_sem) under which memory is allocated with GFP_KERNEL. So neither preloading kernel modules nor memalloc_nofs_save() helps for it; it's still not GFP_NOFS-safe.
I'm still confused. My understanding is that memalloc_nofs_save() means all allocations on that thread until memalloc_nofs_restore() is called effectively gets GFP_NOFS appended to the allocation flags. So since crypto_alloc_skcipher()'s allocation appears to be on the same thread as we'd be calling memalloc_nofs_save/restore(), it would presumably get allocated as though it had flags GFP_KERNEL | GFP_NOFS, even though the call is kzalloc(..., GFP_KERNEL, ...).
I don't understand how the lock would make a difference. Can you elaborate? Sorry for my confusion... Sweet Tea