lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 3/4] exec: unify do_execve/compat_do_execve code
Date
> @@ -1510,11 +1528,27 @@ int do_execve(const char *filename,
> const char __user *const __user *__envp,
> struct pt_regs *regs)
> {
> - struct conditional_ptr argv = { .native = __argv };
> - struct conditional_ptr envp = { .native = __envp };
> + struct conditional_ptr argv = { .ptr.native = __argv };
> + struct conditional_ptr envp = { .ptr.native = __envp };
> return do_execve_common(filename, argv, envp, regs);
> }
>
> +#ifdef CONFIG_COMPAT
> +int compat_do_execve(char *filename,
> + compat_uptr_t __user *__argv,
> + compat_uptr_t __user *__envp,
> + struct pt_regs *regs)
> +{
> + struct conditional_ptr argv = {
> + .is_compat = true, .ptr.compat = __argv,
> + };

Please don't mind to compress a line.

struct conditional_ptr argv = {
.is_compat = true,
.ptr.compat = __argv,
};

is more good readability.


Other parts looks very good to me.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>





\
 
 \ /
  Last update: 2011-03-03 04:15    [W:0.299 / U:18.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site