summaryrefslogtreecommitdiff
path: root/drivers/nubus
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>2022-05-20 21:37:12 +0300
committerJason Gunthorpe <jgg@nvidia.com>2022-05-24 21:08:31 +0300
commitf93e91a0372c922c20d5bee260b0f43b4b8a1bee (patch)
tree10cf6219d37e5fdc9eddb2fe25cca4d342dff756 /drivers/nubus
parent629e052d0c98e46dde9f0824f0aa437f678d9b8f (diff)
downloadlinux-f93e91a0372c922c20d5bee260b0f43b4b8a1bee.tar.xz
RDMA/hfi1: Fix potential integer multiplication overflow errors
When multiplying of different types, an overflow is possible even when storing the result in a larger type. This is because the conversion is done after the multiplication. So arithmetic overflow and thus in incorrect value is possible. Correct an instance of this in the inter packet delay calculation. Fix by ensuring one of the operands is u64 which will promote the other to u64 as well ensuring no overflow. Cc: stable@vger.kernel.org Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20220520183712.48973.29855.stgit@awfm-01.cornelisnetworks.com Reviewed-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/nubus')
0 files changed, 0 insertions, 0 deletions