]> git.proxmox.com Git - mirror_iproute2.git/commit - rdma/utils.c
rdma: Protect dev_map_lookup from wrong input
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 27 Dec 2017 07:57:51 +0000 (09:57 +0200)
committerDavid Ahern <dsahern@gmail.com>
Wed, 27 Dec 2017 15:47:35 +0000 (07:47 -0800)
commit99da90326e6af8e17400a01cf48bb60606dd22a6
tree59e9338d90f1fc19c29652fd047876b1bf0c8c73
parent0fc8c30b4e3ef4c6fc1c3142f9d906ec71d46ab8
rdma: Protect dev_map_lookup from wrong input

Despite the fact that all callers to dev_map_lookup are ensuring that
there is always device name prior to call to that function, it is better
and safer to check that in the dev_map_lookup itself.

Fixes: 40df8263a0f0 ("rdma: Add dev object")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
rdma/utils.c