Re: [PATCH 2/2] um: Use race-free temporary file creation

2015-11-28 Thread Mickaël Salaün
On 28/11/2015 23:07, Richard Weinberger wrote: > Am 28.11.2015 um 22:32 schrieb Mickaël Salaün: >> Open the memory mapped file with the O_TMPFILE flag when available. >> >> Signed-off-by: Mickaël Salaün >> --- >> arch/um/os-Linux/mem.c | 12 >> 1 file changed, 12 insertions(+) >> >>

Re: [PATCH 2/2] um: Use race-free temporary file creation

2015-11-28 Thread Mickaël Salaün
+ errno != EOPNOTSUPP)) + return fd; + errno = 0; >>> >>> Why are you resetting errno? >> >> It's to ignore/reset the error code from open, but it may not be needed >> because of the next call to malloc? > > But then you'd have to reset errno after every

Re: [PATCH 2/2] um: Use race-free temporary file creation

2015-11-28 Thread Richard Weinberger
Am 28.11.2015 um 23:56 schrieb Mickaël Salaün: > > On 28/11/2015 23:07, Richard Weinberger wrote: >> Am 28.11.2015 um 22:32 schrieb Mickaël Salaün: >>> Open the memory mapped file with the O_TMPFILE flag when available. >>> >>> Signed-off-by: Mickaël Salaün >>> --- >>> arch/um/os-Linux/mem.c | 1

[PATCH 2/2] um: Use race-free temporary file creation

2015-11-28 Thread Mickaël Salaün
Open the memory mapped file with the O_TMPFILE flag when available. Signed-off-by: Mickaël Salaün --- arch/um/os-Linux/mem.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 798aeb4..fe52e2d 100644 --- a/arch/um/os-Linux/mem.

Re: [PATCH 2/2] um: Use race-free temporary file creation

2015-11-28 Thread Richard Weinberger
Am 28.11.2015 um 22:32 schrieb Mickaël Salaün: > Open the memory mapped file with the O_TMPFILE flag when available. > > Signed-off-by: Mickaël Salaün > --- > arch/um/os-Linux/mem.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/