Skip to content

Commit

Permalink
[CRYPTO] cryptd: Fix problem with cryptd and the freezer
Browse files Browse the repository at this point in the history
Make sure that cryptd is marked as nonfreezable and does not hold up the
freezer.

Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
rjwysocki authored and herbertx committed May 31, 2007
1 parent 7a74fc4 commit 189fe31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;

Expand Down

0 comments on commit 189fe31

Please sign in to comment.