]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Check for rdma_protocol_ib only after validating port_num
authorJason Gunthorpe <jgg@mellanox.com>
Mon, 25 Jun 2018 22:03:41 +0000 (16:03 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 27 Jun 2018 21:05:58 +0000 (15:05 -0600)
commit7d7d33e2ea25bbd5cc635a75a3f9554bfd556022
tree7ad6c0170c1d414a8ad219465502afdbae08018d
parentb6aacd95435a48d04f3badb204ff5e993ce565c2
IB/core: Check for rdma_protocol_ib only after validating port_num

port_num is untrusted data from the user, so it should be checked after
calling fill_sgid_attr, which validates it.

Fixes: badbc3488524 ("IB/core: Add a sgid_attr pointer to struct rdma_ah_attr")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/verbs.c