From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Maximilian Engelhardt <maxi@daemonizer.de>,
nigel@nigel.suspend2.net,
linux-kernel <linux-kernel@vger.kernel.org>,
Pavel Machek <pavel@ucw.cz>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: software suspend doesn't work with 2.6.22-rc3
Date: Thu, 31 May 2007 09:13:44 +0200 [thread overview]
Message-ID: <200705310913.45234.rjw@sisk.pl> (raw)
In-Reply-To: <200705310904.47894.rjw@sisk.pl>
On Thursday, 31 May 2007 09:04, Rafael J. Wysocki wrote:
> On Thursday, 31 May 2007 08:54, Rafael J. Wysocki wrote:
> > On Tuesday, 29 May 2007 02:39, Herbert Xu wrote:
> > > On Mon, May 28, 2007 at 08:21:29PM +0200, Rafael J. Wysocki wrote:
> > > >
> > > > Well, it looks like we have to fix this one separately.
> > > >
> > > > Can you please tell me what to do to make cryptd run?
> > >
> > > If you build it as a module then just loading it should be sufficient.
> > > If you have it built-in then it should always be there.
> > >
> > > Let me know when you guys have a final patch.
> >
> > The problem is more serious than I thought:
> >
> > kthread_create() in crypto/cryptd.c line 302 doesn't return, so cryptd is stuck
> > in TASK_UNINTERRUPTIBLE all the time and it doesn't even execute one
> > instruction from cryptd_thread() [this happens on x86_64].
>
> Sorry, I was wrong.
>
> kthread_create() returns, but cryptd_thread() is not executed and the cryptd
> process is stuck in TASK_UNINTERRUPTIBLE.
It can be fixed by replacing the kthread_create() with kthread_run(). Patch
follows.
Greetings,
Rafael
---
From: Rafael J. Wysocki <rjw@sisk.pl>
Make cryptd actually run and mark it as nonfreezable.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
crypto/cryptd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6.22-rc3/crypto/cryptd.c
===================================================================
--- linux-2.6.22-rc3.orig/crypto/cryptd.c 2007-05-26 22:08:07.000000000 +0200
+++ linux-2.6.22-rc3/crypto/cryptd.c 2007-05-31 09:13:38.000000000 +0200
@@ -298,7 +298,7 @@ static inline int cryptd_create_thread(s
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;
next prev parent reply other threads:[~2007-05-31 7:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-26 9:28 Maximilian Engelhardt
2007-05-26 9:53 ` Nigel Cunningham
2007-05-26 11:08 ` Herbert Xu
2007-05-26 11:14 ` Nigel Cunningham
2007-05-26 11:55 ` Herbert Xu
2007-05-26 20:23 ` Rafael J. Wysocki
2007-05-26 12:49 ` Maximilian Engelhardt
2007-05-26 20:20 ` Rafael J. Wysocki
2007-05-26 21:33 ` Nigel Cunningham
2007-05-27 16:01 ` Maximilian Engelhardt
2007-05-27 18:19 ` Rafael J. Wysocki
2007-05-27 20:41 ` Maximilian Engelhardt
2007-05-27 21:27 ` Rafael J. Wysocki
2007-05-28 0:21 ` Maximilian Engelhardt
2007-05-28 7:59 ` Rafael J. Wysocki
2007-05-28 18:21 ` Rafael J. Wysocki
2007-05-28 21:02 ` Maximilian Engelhardt
2007-05-29 0:39 ` Herbert Xu
2007-05-29 12:01 ` Rafael J. Wysocki
2007-05-31 6:54 ` Rafael J. Wysocki
2007-05-31 7:04 ` Rafael J. Wysocki
2007-05-31 7:13 ` Rafael J. Wysocki [this message]
2007-05-31 8:08 ` Herbert Xu
2007-05-27 20:35 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705310913.45234.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=ebiederm@xmission.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=maxi@daemonizer.de \
--cc=nigel@nigel.suspend2.net \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®