diff options
| author | Gustavo A. R. Silva <[email protected]> | 2022-01-11 07:54:27 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-01-26 12:50:07 +0000 |
| commit | 75c19f487fcd59b28e83e64a6563fc4c69ad377d (patch) | |
| tree | 3e914c929dc62ba13377644d121ca7cf420f0faa /drivers/usb/cdns3 | |
| parent | Linux 5.17-rc1 (diff) | |
| download | kernel-75c19f487fcd59b28e83e64a6563fc4c69ad377d.tar.gz kernel-75c19f487fcd59b28e83e64a6563fc4c69ad377d.zip | |
usb: host: ehci-sched: 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 or integer overflows that,
in the worse scenario, could lead to heap overflows.
Also, address the following sparse warning:
drivers/usb/host/ehci-sched.c:1168:40: warning: using sizeof on a flexible structure
Link: https://github.com/KSPP/linux/issues/160
Link: https://github.com/KSPP/linux/issues/174
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/20220111075427.GA76390@embeddedor
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3')
0 files changed, 0 insertions, 0 deletions
