Re: [PATCH 3/4] vfio: ccw: set ccw->cda to NULL defensively

2018-03-27 Thread Cornelia Huck
On Tue, 27 Mar 2018 11:08:09 +0800 Dong Jia Shi wrote: > * Cornelia Huck [2018-03-26 15:47:53 +0200]: > > > On Wed, 21 Mar 2018 03:08:21 +0100 > > Dong Jia Shi wrote: > > > > > Let's avoid free on ccw->cda that points to a guest address > > > or a already freed memory area by setting it to

Re: [PATCH 3/4] vfio: ccw: set ccw->cda to NULL defensively

2018-03-26 Thread Cornelia Huck
On Wed, 21 Mar 2018 03:08:21 +0100 Dong Jia Shi wrote: > Let's avoid free on ccw->cda that points to a guest address > or a already freed memory area by setting it to NULL if memory > allocation didn't happen or failed. Does not hurt, I guess. > > Signed-off-by: Dong Jia Shi > --- > drivers/

[PATCH 3/4] vfio: ccw: set ccw->cda to NULL defensively

2018-03-20 Thread Dong Jia Shi
Let's avoid free on ccw->cda that points to a guest address or a already freed memory area by setting it to NULL if memory allocation didn't happen or failed. Signed-off-by: Dong Jia Shi --- drivers/s390/cio/vfio_ccw_cp.c | 28 +++- 1 file changed, 19 insertions(+), 9 del