Commit 8843170e authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] tmpfs atomicity fix

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: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 026a14f0
......@@ -1332,7 +1332,8 @@ shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t
__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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment