Re: [PATCH] linux/uaccess.h needs to #include linux/kernel.h formight_sleep()

From: Andrew Morton
Date: Mon Jun 20 2011 - 19:43:19 EST


On Wed, 15 Jun 2011 01:22:10 +0100
David Howells <dhowells@xxxxxxxxxx> wrote:

> linux/uaccess.h needs to #include linux/kernel.h to get might_sleep() otherwise
> it fails to build on MN10300 allyesconfig. This fails in a few places with
> messages like the following:

uaccess.h doesn't textually refer to might_sleep().

> In file included from security/keys/trusted.c:14:
> include/linux/uaccess.h: In function '__copy_from_user_nocache':
> include/linux/uaccess.h:52: error: implicit declaration of function 'might_sleep'

This happened because of arch/mn10300/include/asm/uaccess.h's

#define __copy_from_user(to, from, n) \
({ \
might_sleep(); \
__copy_from_user_inatomic((to), (from), (n)); \
})

> include/linux/uaccess.h | 1 +

So I'd suggest that patching the arch header file is the appropriate fix.

--
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/