lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMOw1v5vOsx0mzuYSJc39E3XFY+U3RC4eezeE7MoPWzssz6jew@mail.gmail.com>
Date:	Sat, 9 Mar 2013 20:57:02 -0300
From:	Lucas De Marchi <lucas.demarchi@...fusion.mobi>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	lucas.de.marchi@...il.com, David Howells <dhowells@...hat.com>,
	James Morris <james.l.morris@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

On Sat, Mar 9, 2013 at 5:42 PM, Oleg Nesterov <oleg@...hat.com> wrote:
> On 03/08, Lucas De Marchi wrote:
>>
>> @@ -571,9 +572,17 @@ void do_coredump(siginfo_t *siginfo)
>>                       goto fail_dropcount;
>>               }
>>
>> -             retval = call_usermodehelper_fns(helper_argv[0], helper_argv,
>> -                                     NULL, UMH_WAIT_EXEC, umh_pipe_setup,
>> -                                     NULL, &cprm);
>> +             sub_info = call_usermodehelper_setup(helper_argv[0],
>> +                                             helper_argv, NULL, GFP_KERNEL,
>> +                                             umh_pipe_setup, NULL, &cprm);
>> +             if (!sub_info) {
>> +                     printk(KERN_WARNING "%s failed to allocate memory\n",
>> +                            __func__);
>
> Why?
>
>> +                     argv_free(helper_argv);
>> +                     goto fail_dropcount;
>> +             }
>> +
>> +             retval = call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC);
>
> I do not really like another argv_free() here... How about
>
>                 retval = -ENOMEM;
>                 info = call_usermodehelper_setup(...);
>                 if (info)
>                         retval = call_usermodehelper_fns(...);
>                 argv_free();
>
> ?

Looks good. I'll prepare a v3

Thanks
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ