]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/mlx5: Fix possible array overflow
authorEli Cohen <eli@dev.mellanox.co.il>
Sun, 14 Sep 2014 13:47:53 +0000 (16:47 +0300)
committerRoland Dreier <roland@purestorage.com>
Thu, 9 Oct 2014 07:08:40 +0000 (00:08 -0700)
commit1c3ce90d0acb0c661910dd84f416b3053e9710af
treef9023638d399fa1f01e52c7d68f537ff50c8bcac
parent377b513485fd885dea1083a9a5430df65b35e048
IB/mlx5: Fix possible array overflow

The check to verify that userspace does not provide an invalid index to the
micro UAR was placed too late. Fix this by moving the check before using the
index.

Reported by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx5/main.c