aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr/lpddr_cmds.c
diff options
context:
space:
mode:
authorLeon Romanovsky <[email protected]>2020-02-12 07:26:35 +0000
committerJason Gunthorpe <[email protected]>2020-02-13 14:39:23 +0000
commit9b6d3bbc1335404b331f4f11dc896066bdf1c752 (patch)
tree2dd5eb3eabf24c6a922a8649c6acf9e9e5410c26 /drivers/mtd/lpddr/lpddr_cmds.c
parentIB/umad: Fix kernel crash while unloading ib_umad (diff)
downloadkernel-9b6d3bbc1335404b331f4f11dc896066bdf1c752.tar.gz
kernel-9b6d3bbc1335404b331f4f11dc896066bdf1c752.zip
RDMA/mlx5: Prevent overflow in mmap offset calculations
The cmd and index variables declared as u16 and the result is supposed to be stored in u64. The C arithmetic rules doesn't promote "(index >> 8) << 16" to be u64 and leaves the end result to be u16. Fixes: 7be76bef320b ("IB/mlx5: Introduce VAR object and its alloc/destroy methods") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions