Re: [PATCH 2/3] ptrace: add __force markup

From: Arnd Bergmann
Date: Sun Aug 22 2010 - 16:07:09 EST


On Sunday 22 August 2010 12:22:15 Namhyung Kim wrote:
> index 4afd9b8..1abbb4d 100644
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -580,18 +580,19 @@ int ptrace_request(struct task_struct *child, long request,
> ret = ptrace_setoptions(child, data);
> break;
> case PTRACE_GETEVENTMSG:
> - ret = put_user(child->ptrace_message, (unsigned long __user *) data);
> + ret = put_user(child->ptrace_message,
> + (unsigned long __user __force *) data);
> break;

Maybe you should introduce a new temporary variable

void __user *p = (void __user __force*)data;

and get rid of all the other casts instead.

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