Re: my slab cache broken on sparc64

From: Roman Zippel (zippel@linux-m68k.org)
Date: Sat May 04 2002 - 04:46:01 EST


Hi

On Fri, 3 May 2002, David S. Miller wrote:

> If the __get_user() fails, you will leave the kernel in the
> KERNEL_DS segment.
>
> Do it like this instead.
>
> int fault;
> mm_segment_t old_fs;
>
> ...
>
> old_fs = get_fs();
> set_fs(KERNEL_DS);
> fault = __get_user(tmp, pc->name);
> set_fs(old_fs);
>
> if (fault) {
> ...

He can also simply move it outside of the loop to avoid this problem.

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:22 EST