Re: [2.6.8-rc2-mm2] oops report (crashes on booting)

From: Bernd Schubert
Date: Wed Aug 04 2004 - 14:55:12 EST


>
> tmpfs must use __copy_from_user_inatomic now, to avoid might_sleep
> warning, when knowingly using __copy_from_user with an atomic kmap.
>
> Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
>
> --- 2.6.8-rc2-mm2/mm/shmem.c 2004-08-02 13:03:33.000000000 +0100
> +++ linux/mm/shmem.c 2004-08-04 18:05:07.917110256 +0100
> @@ -1323,7 +1323,8 @@ shmem_file_write(struct file *file, cons
> __get_user(dummy, buf + bytes - 1);
>
> kaddr = kmap_atomic(page, KM_USER0);
> - left = __copy_from_user(kaddr + offset, buf, bytes);
> + left = __copy_from_user_inatomic(kaddr + offset,
> + buf, bytes);
> kunmap_atomic(kaddr, KM_USER0);
> }
> if (left) {

Thanks a lot, that fixed it.

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