android_kernel_samsung_msm8976/drivers/infiniband/hw/mthca
Yann Droneaud 45efb79d12 IB/mthca: Return an error on ib_copy_to_udata() failure
commit 08e74c4b00c30c232d535ff368554959403d0432 upstream.

In case of error when writing to userspace, the function mthca_create_cq()
does not set an error code before following its error path.

This patch sets the error code to -EFAULT when ib_copy_to_udata() fails.

This was caught when using spatch (aka. coccinelle)
to rewrite call to ib_copy_{from,to}_udata().

Link: 75ebf2c103:ib_copy_udata.cocci
Link: http://marc.info/?i=cover.1394485254.git.ydroneaud@opteya.com
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:30 -07:00
..
Kconfig
Makefile
mthca_allocator.c
mthca_av.c
mthca_catas.c
mthca_cmd.c
mthca_cmd.h
mthca_config_reg.h
mthca_cq.c IB: Change CQE "csum_ok" field to a bit flag 2012-03-08 12:34:27 -08:00
mthca_dev.h
mthca_doorbell.h
mthca_eq.c
mthca_mad.c
mthca_main.c Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
mthca_mcg.c
mthca_memfree.c
mthca_memfree.h
mthca_mr.c IB/mthca: Fix buddy->num_free allocation size 2011-11-03 17:48:25 -07:00
mthca_pd.c
mthca_profile.c
mthca_profile.h
mthca_provider.c IB/mthca: Return an error on ib_copy_to_udata() failure 2014-05-06 07:55:30 -07:00
mthca_provider.h
mthca_qp.c IB/mthca: Fill in sq_sig_type in query QP 2012-07-11 09:22:57 -07:00
mthca_reset.c IB/mthca: Use PCI Express Capability accessors 2012-08-23 10:11:15 -06:00
mthca_srq.c
mthca_uar.c
mthca_user.h
mthca_wqe.h