Commit a7901d5e authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: zero all data buffers

Don't assume the buffer data area will all be overwritten.  Zero all
buffer space, to avoid sending crap over the wire.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 170229d1
......@@ -113,7 +113,7 @@ static int alloc_gbuf_data(struct gbuf *gbuf, unsigned int size,
* CPort Id before the data; set aside an extra byte for
* that purpose in that case.
*/
buffer = kmalloc(cport_reserve + size, gfp_mask);
buffer = kzalloc(cport_reserve + size, gfp_mask);
if (!buffer)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment