OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 09:51:58 +0000 (11:51 +0200)
commitd25946f617459fc34320757a35c1947e07d90e4e
treeda880bf2f1a88ae7c4339e6e96b9ae62ea7e7fe6
parent3197b8c7f9068142e5612003a015caeddd8ed342
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/ucma.c