dont know if David subscribes to this list ...

On Thursday 20 May 2010 04:14:45 Philippe De Muyter wrote:
> Hi Greg,
> 
> --
> Avoid filename < TASK_SIZE test in do_getname() when no MMU.
> 
> Without MMU, filenames can be anywhere in memory.  It is thus wrong to
> check that filename is before TASK_SIZE in do_getname().
> 
> Signed-off-by: Philippe De Muyter <p...@macqel.be>
> ---
>  fs/namei.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index b86b96f..658bc1d 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -119,12 +119,14 @@ static int do_getname(const char __user *filename,
> char *page) int retval;
>       unsigned long len = PATH_MAX;
> 
> +#ifdef CONFIG_MMU
>       if (!segment_eq(get_fs(), KERNEL_DS)) {
>               if ((unsigned long) filename >= TASK_SIZE)
>                       return -EFAULT;
>               if (TASK_SIZE - (unsigned long) filename < PATH_MAX)
>                       len = TASK_SIZE - (unsigned long) filename;
>       }
> +#endif
> 
>       retval = strncpy_from_user(page, filename, len);
>       if (retval > 0) {

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to