]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkback: use kzalloc() in favor of kmalloc()+memset()
authorJan Beulich <JBeulich@suse.com>
Fri, 16 Sep 2011 07:38:09 +0000 (08:38 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 19 Oct 2011 20:31:20 +0000 (16:31 -0400)
commite890fe456af90729ba214b7ee04210eaada5cc4c
treea8407e4f23f3e2568ab29944c50d0d2acb1aa36a
parent6df9e78967528c4d67cffaa2a59e26a0e22636db
xen-blkback: use kzalloc() in favor of kmalloc()+memset()

This fixes the problem of three of those four memset()-s having
improper size arguments passed: Sizeof a pointer-typed expression
returns the size of the pointer, not that of the pointed to data.

It also reverts using kmalloc() instead of kzalloc() for the allocation
of the pending grant handles array, as that array gets fully
initialized in a subsequent loop.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c