linux-stable/drivers/infiniband
Leon Romanovsky fe48aecb4d RDMA/uverbs: Don't fail in creation of multiple flows
The conversion from offsetof() calculations to sizeof()
wrongly behaved for missed exact size and in scenario with
more than one flow.

In such scenario we got "create flow failed, flow 10: 8 bytes
left from uverb cmd" error, which is wrong because the size of
kern_spec is exactly 8 bytes, and we were not supposed to fail.

Cc: <stable@vger.kernel.org> # 3.12
Fixes: 4fae7f1704 ("RDMA/uverbs: Fix slab-out-of-bounds in ib_uverbs_ex_create_flow")
Reported-by: Ran Rozenstein <ranro@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-07-03 14:08:00 -06:00
..
core RDMA/uverbs: Don't fail in creation of multiple flows 2018-07-03 14:08:00 -06:00
hw IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values 2018-06-26 14:35:55 -06:00
sw 4.18-rc 2018-06-21 07:22:30 +09:00
ulp treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
Kconfig RDMA/ucm: Mark UCM interface as BROKEN 2018-05-24 09:39:25 -06:00
Makefile