Re: Virt: Kvm - Fix possible ERR_PTR() dereferencing.

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 08:50, Shailendra Verma wrote: > This is of course wrong to call kfree() if memdup_user() fails, > no memory was allocated and the error in the error-valued pointer > should be returned. > > Reviewed-by: Ravikant Sharma > Signed-off-by: Shailendra Verma > --- > virt/kvm/kvm_main

Virt: Kvm - Fix possible ERR_PTR() dereferencing.

2016-09-19 Thread Shailendra Verma
This is of course wrong to call kfree() if memdup_user() fails, no memory was allocated and the error in the error-valued pointer should be returned. Reviewed-by: Ravikant Sharma Signed-off-by: Shailendra Verma --- virt/kvm/kvm_main.c | 20 ++-- 1 file changed, 6 insertions(+),