xhci: mem: Carefully calculate size for memory allocations
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 17 Mar 2023 15:47:02 +0000 (17:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2023 16:25:22 +0000 (17:25 +0100)
commit347284984f415e52590373253c6943bbdc806ebf
tree4b4dc56e7244deb9c83ebbb96bc10cf6ca883a4a
parent8be174835f07b2c106b9961c0775486d06112a3c
xhci: mem: Carefully calculate size for memory allocations

Carefully calculate size for memory allocations, i.e. with help
of size_mul() macro from overflow.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230317154715.535523-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c