Re: [PATCH] loop.c: kernel_thread() retval check

From: Solar Designer
Date: Sun Aug 20 2006 - 10:33:56 EST

On Sun, Aug 20, 2006 at 09:21:48AM +0200, Willy Tarreau wrote:
> I still remembered this problem being discussed, and finally found
> the thread :

I was not aware that this had been discussed before. Bernhard (in the
old LKML posting above) seems to imply that having kernel_thread()
itself not fail on ptrace would be a sufficient fix, which I don't agree
with. There may be other reasons for kernel_thread() to fail, such as
the kernel running out of resources; with OpenVZ, kernel_thread() is not
allowed from within VEs.

> In fact, no code was proposed and 2.6 got fixed later, then stopped
> using kernel_thread() so nearly nobody might have noticed it :

I'm afraid that this does not properly clean things up on error. I just
had a look at linux- - it still uses
kernel_thread() and has the same "goto out_putf" on error return from
kernel_thread(), which appears to not clean things up.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at