Re: [PATCH] Kernel: Improvement in code readability when memdup_user_nul() fails.

2016-11-11 Thread Eric W. Biederman
Sachin Shukla writes: > From: "Sachin Shukla" > > There is no need to call kfree() if memdup_user_nul() fails, as no memory > was allocated and the error in the error-valued pointer should be > returned. Nacked-by: "Eric W. Biederman" This is stupid, unnecesary gratituous change that makes th

Re: [PATCH] Kernel: Improvement in code readability when memdup_user_nul() fails.

2016-11-11 Thread Serge E. Hallyn
On Fri, Nov 11, 2016 at 02:37:15PM +0530, Sachin Shukla wrote: > From: "Sachin Shukla" > > There is no need to call kfree() if memdup_user_nul() fails, as no memory > was allocated and the error in the error-valued pointer should be returned. Hi, in general, having a common exit path is conside

Re: [PATCH] Kernel: Improvement in code readability when memdup_user_nul() fails.

2016-11-11 Thread Vivek Gautam
On Fri, Nov 11, 2016 at 2:37 PM, Sachin Shukla wrote: > From: "Sachin Shukla" > > There is no need to call kfree() if memdup_user_nul() fails, as no memory > was allocated and the error in the error-valued pointer should be returned. > > Signed-off-by: Sachin Shukla > --- > kernel/user_namespac

[PATCH] Kernel: Improvement in code readability when memdup_user_nul() fails.

2016-11-11 Thread Sachin Shukla
From: "Sachin Shukla" There is no need to call kfree() if memdup_user_nul() fails, as no memory was allocated and the error in the error-valued pointer should be returned. Signed-off-by: Sachin Shukla --- kernel/user_namespace.c | 25 ++--- 1 file changed, 14 insertions(+