]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: cls_u32: Use struct_size() in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 18 Jun 2020 14:53:42 +0000 (09:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:19:24 +0000 (20:19 -0700)
commitda07df9d5a36d96c67875b1fb133ca82cf74f5a5
tree81caa2b64f40066395f5a27f6560b2c03ff656f3
parented8521fb84d6f35d65e6072825855685f56352f3
net/sched: cls_u32: Use struct_size() in kzalloc()

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_u32.c