mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 02:59:19 -04:00
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: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
170229d195
commit
a7901d5ef7
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user