diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-08 12:25:14 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-10-28 11:20:34 -0300 |
commit | 515f60004ed985d2b2f03659365752e0b6142986 (patch) | |
tree | 0861328fdec133b95f3565647df20cf44fdd1620 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 24f52149230454249ae628b922f741036e83b84c (diff) |
RDMA/hns: Prevent undefined behavior in hns_roce_set_user_sq_size()
The "ucmd->log_sq_bb_count" variable is a user controlled variable in the
0-255 range. If we shift more than then number of bits in an int then
it's undefined behavior (it shift wraps), and potentially the int could
become negative.
Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20190608092514.GC28890@mwanda
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions