[Vserver] Re: Chasing kernel crashes on SMP

From: Grzegorz Nosek <grzegorz.nosek_at_gmail.com>
Date: Mon 28 Nov 2005 - 13:07:45 GMT
Message-ID: <121a28810511280507m6a64b896r@mail.gmail.com>

2005/11/28, Grzegorz Nosek <grzegorz.nosek@gmail.com>:
>
> Hello
>
> It seems that my original message is still awaiting moderator approval
> due to attachment size but I moved a bit forward with tracing the
> oops. Apparently do_task_state gets passed a null task_struct pointer
> as the first argument and crashes upon entering get_task_state (which,
> incidentally, is the first real instruction in this function).
>
> It looks like a race condition where the task_struct is freed "just
> before" the call to proc_t[g]id_stat and do_task_stat.
>
> Does the following look like an acceptable fix for this issue? I'll
> throw it into a test kernel and give it a try, but I'd really
> appreciate your comments.
>
> Best regards,
> Grzegorz Nosek
>
> --- fs/proc/base.c.orig 2005-11-25 00:07:43.000000000 +0100
> +++ fs/proc/base.c 2005-11-28 11:44:11.000000000 +0100
> @@ -718,6 +718,9 @@
> ssize_t length;
> struct task_struct *task = proc_task(inode);
>
> + if (!task)
> + return -ENOENT;
> +
> if (count > PROC_BLOCK_SIZE)
> count = PROC_BLOCK_SIZE;
> if (!(page = __get_free_page(GFP_KERNEL)))
>

Talking to myself :) Oh well.

The kernel compiled and booted, the OS is running apparently without
any problems. I'm doing an -j8 kernel compile (with fill-rate 14 and
interval 4 on 4-way smp) of other kernels and if it actually survives
that long (it didn't on rev17) I'll call it a minor success and
install it on other vserver-enabled machines.

Oh and BTW, any chance of merging the sendfile-oops patch? :)

Best regards,
 Grzegorz Nosek
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Mon Nov 28 13:08:09 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 28 Nov 2005 - 13:08:34 GMT by hypermail 2.1.8