From 189fe3174ce93f4c949325426c87c4d875a13424 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 31 May 2007 18:10:22 +1000 Subject: [PATCH] [CRYPTO] cryptd: Fix problem with cryptd and the freezer Make sure that cryptd is marked as nonfreezable and does not hold up the freezer. Signed-off-by: Rafael J. Wysocki Signed-off-by: Herbert Xu --- crypto/cryptd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 3ff4e1f0f032..ac6dce2e7596 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -298,7 +298,7 @@ static inline int cryptd_create_thread(struct cryptd_state *state, mutex_init(&state->mutex); crypto_init_queue(&state->queue, CRYPTD_MAX_QLEN); - state->task = kthread_create(fn, state, name); + state->task = kthread_run(fn, state, name); if (IS_ERR(state->task)) return PTR_ERR(state->task); @@ -316,6 +316,8 @@ static int cryptd_thread(void *data) struct cryptd_state *state = data; int stop; + current->flags |= PF_NOFREEZE; + do { struct crypto_async_request *req, *backlog;