original_kernel/drivers/infiniband/core
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
..
Makefile
addr.c
agent.c
agent.h
cache.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
cgroup.c
cm.c
cm_msgs.h
cma.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
cma_configfs.c
cma_priv.h
core_priv.h
cq.c
device.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
fmr_pool.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
iwcm.c
iwcm.h
iwpm_msg.c
iwpm_util.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
iwpm_util.h
mad.c
mad_priv.h
mad_rmpp.c
mad_rmpp.h
mr_pool.c
multicast.c
netlink.c
nldev.c
opa_smi.h
packer.c
rdma_core.c
rdma_core.h
restrack.c
roce_gid_mgmt.c
rw.c
sa.h
sa_query.c
security.c
smi.c
smi.h
sysfs.c
ucm.c
ucma.c
ud_header.c
umem.c
umem_odp.c treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
user_mad.c
uverbs.h
uverbs_cmd.c RDMA/uverbs: Don't fail in creation of multiple flows 2018-07-03 14:08:00 -06:00
uverbs_ioctl.c
uverbs_ioctl_merge.c
uverbs_main.c IB/uverbs: Fix ordering of ucontext check in ib_uverbs_write 2018-06-12 14:39:32 -06:00
uverbs_marshall.c
uverbs_std_types.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c
uverbs_std_types_dm.c
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c
verbs.c RDMA/core: Save kernel caller name when creating CQ using ib_create_cq() 2018-06-18 11:32:58 -06:00