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]
Date:	Mon, 25 Feb 2013 17:51:47 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	linux-kernel@...r.kernel.org,
	James Morris <james.l.morris@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

On 02/25, David Howells wrote:
>
> Lucas De Marchi <lucas.demarchi@...fusion.mobi> wrote:
>
> > This patch fixes both call_usermodehelper_fns() to never call the
> > cleanup function in case retval == -ENOMEM and also the callers to
> > actually check the return value of this function.
>
> I suspect it's probably better to always call the cleanup function from
> call_usermodehelper_fns() rather than have the cleanup done by the caller in
> some circumstances and not others - would it make sense to change the cleanup
> function to take the pointer to the caller data rather than to take the
> subprocess_info struct?

I this this will comlicate the logic even more, the "caller data"
has to be kmalloced/kfreed as well.

Btw. __orderly_poweroff() doesn't need any tricks, afaics. I'll send
a simple cleanup in a minute.

Oleg.

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