On Sun, Nov 02, 2014 at 04:59:35PM +0100, Florian Weimer wrote:
* Eric Rannaud:
This patch above is a straightforward fix, but Linus asks: why not
invoke va_arg() unconditionally? The 'mode' argument thus read could
not be used by the wrapper, as it could contain garbage, but it could
be passed untouched to the kernel.
If technically undefined behavior which just happens to work is
acceptable, you could also add the optional argument to the argument
list. This would address the performance concern which may have been
the reason to make the va_arg call conditional.
I don't think it's acceptable.