]> git.baikalelectronics.ru Git - kernel.git/commit
xen: use struct_size() helper in kzalloc()
authorAndrea Righi <andrea.righi@canonical.com>
Wed, 3 Apr 2019 05:26:36 +0000 (07:26 +0200)
committerJuergen Gross <jgross@suse.com>
Fri, 5 Apr 2019 06:42:41 +0000 (08:42 +0200)
commit3a4357743c3cd46fb2f97406ab04ea36368a3b9a
tree04c7feffd21b0a2ecfdcb23b0293a8d44019c8ea
parent4b3080ea2502b9302cf768a97beb151c54857db4
xen: use struct_size() helper in kzalloc()

struct privcmd_buf_vma_private has a zero-sized array at the end
(pages), use the new struct_size() helper to determine the proper
allocation size and avoid potential type mistakes.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/privcmd-buf.c