summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-11-24 14:10:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 21:44:01 +0100
commit5bba129eaa002b8e1be0bd0e33d9937ae0d80805 (patch)
treebcadc509b20a0f224aea69fa514257630eabd633 /drivers
parent7966f2d22e2a9bb00b8b216275283d017e092fa2 (diff)
downloadlinux-5bba129eaa002b8e1be0bd0e33d9937ae0d80805.tar.bz2
staging: lustre: lnet: memory corruption in selftest
We want sizeof(struct lstcon_node) but instead we're getting the sizeof a pointer. Fixes: 8d78f0f2ba76 ("staging: lustre: lnet: cleanup some of the > 80 line issues") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/lustre/lnet/selftest/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
index f2d11fac5bd8..f750b9cb0441 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -86,7 +86,7 @@ lstcon_node_find(lnet_process_id_t id, struct lstcon_node **ndpp, int create)
if (!create)
return -ENOENT;
- LIBCFS_ALLOC(*ndpp, sizeof(*ndpp) + sizeof(*ndl));
+ LIBCFS_ALLOC(*ndpp, sizeof(**ndpp) + sizeof(*ndl));
if (!*ndpp)
return -ENOMEM;