]> git.baikalelectronics.ru Git - kernel.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>
Thu, 13 Oct 2011 13:48:34 +0000 (09:48 -0400)
commitcd499b94b46f412645994abda65d81d29bbde819
tree0e37fa8f70308ca1e6bebde46423bfd2984e0088
parentbad044803dde013d2c3a71fe705dcd7af8afb52d
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