Messages in this thread Patch in this message | | | Date | Wed, 4 Aug 2004 18:20:21 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [2.6.8-rc2-mm2] oops report (crashes on booting) |
| |
On Wed, 4 Aug 2004, Bernd Schubert wrote: > > we just tried to boot one of our systems using 2.6.8-rc2-mm2, > unfortunately it oopses after running pivot_root and init: > > (written down manually) > > Debug: sleeping function called from invalid context at > include/asm/uaccess.h:471 > > in_atomic():1, irqs_disabled():0 > dump_stack > __might_sleep > shmem_file_write
It shouldn't be an oops, but it'll certainly be a very disturbing splurge of messages. Sorry, I should have caught it sooner. Please apply patch below (which not only sidesteps the warnings, but appears to be the _right_ thing to do, from a look at filemap.c)...
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@veritas.com>
--- 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) { - 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/
| |