From: Oleg Drokin Date: Fri, 11 Oct 2013 01:17:03 +0000 (-0400) Subject: LU-4088 obdecho: Copy entire lsm, not just pointer size X-Git-Tag: 2.5.53~76 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=aefd5a20842bde9daf8fc996751fa37ff497933d LU-4088 obdecho: Copy entire lsm, not just pointer size From linux-kernel upstream: Author: Thomas Meyer Date: Thu Sep 19 23:45:46 2013 +0200 staging: lustre: Cocci spatch "noderef" sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer Change-Id: If5ce3597abe1d2a806c94e34a1b7dc4c27f19e02 Reviewed-on: http://review.whamcloud.com/7922 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index a4bef14..0b22468 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -1424,7 +1424,7 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob) if (nob > ulsm_nob) return (-EINVAL); - if (copy_to_user (ulsm, lsm, sizeof(ulsm))) + if (copy_to_user (ulsm, lsm, sizeof(*ulsm))) return (-EFAULT); for (i = 0; i < lsm->lsm_stripe_count; i++) {