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

Arnd Bergmann
2010-08-22T20:06:56Z

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