Re: [PATCH] xen-blkback: do not leak mode property

2013-01-11 Thread Konrad Rzeszutek Wilk
On Thu, Dec 20, 2012 at 10:31:11AM +, Jan Beulich wrote: > "be->mode" is obtained from xenbus_read(), which does a kmalloc() for > the message body. The short string is never released, so do it along > with freeing "be" itself, and make sure the string isn't kept when > backend_changed() doesn'

[PATCH] xen-blkback: do not leak mode property

2012-12-20 Thread Jan Beulich
"be->mode" is obtained from xenbus_read(), which does a kmalloc() for the message body. The short string is never released, so do it along with freeing "be" itself, and make sure the string isn't kept when backend_changed() doesn't complete successfully (which made it desirable to slightly re-struc

Re: [PATCH] xen/blkback: do not leak mode property

2012-12-05 Thread Jan Beulich
>>> On 04.12.12 at 19:21, Olaf Hering wrote: > On Tue, Dec 04, Jan Beulich wrote: > >> This looks necessary but insufficient - there's nothing really >> preventing backend_changed() from being called more than once >> for a given device (is simply the handler of xenbus watch). Hence >> I think ei

Re: [PATCH] xen/blkback: do not leak mode property

2012-12-04 Thread Olaf Hering
On Tue, Dec 04, Jan Beulich wrote: > This looks necessary but insufficient - there's nothing really > preventing backend_changed() from being called more than once > for a given device (is simply the handler of xenbus watch). Hence > I think either that function needs to be guarded against multipl

Re: [PATCH] xen/blkback: do not leak mode property

2012-12-04 Thread Jan Beulich
>>> On 03.12.12 at 20:32, Olaf Hering wrote: > be->mode is obtained from xenbus_read, which does a kmalloc for the > message body. The short string is never released, so do it on blkbk > remove. > > Signed-off-by: Olaf Hering > --- > > !! Not compile tested !! > > drivers/block/xen-blkback/xe

[PATCH] xen/blkback: do not leak mode property

2012-12-03 Thread Olaf Hering
be->mode is obtained from xenbus_read, which does a kmalloc for the message body. The short string is never released, so do it on blkbk remove. Signed-off-by: Olaf Hering --- !! Not compile tested !! drivers/block/xen-blkback/xenbus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers