RDMA/ucma: Check that device exists prior to accessing it
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 25 Mar 2018 08:39:05 +0000 (11:39 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 31 May 2018 23:30:26 +0000 (00:30 +0100)
commitb9bae75805932048d0b5172cd63f83b28668eb02
treec9e02e8731970451235effdbfebbe447c3d568fe
parentbf66bb07cb394f68e75b547e558a945563a70d63
RDMA/ucma: Check that device exists prior to accessing it

commit c8d3bcbfc5eab3f01cf373d039af725f3b488813 upstream.

Ensure that device exists prior to accessing its properties.

Reported-by: <syzbot+71655d44855ac3e76366@syzkaller.appspotmail.com>
Fixes: 75216638572f ("RDMA/cma: Export rdma cm interface to userspace")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/infiniband/core/ucma.c