* [patch] staging: lustre: lnet: memory corruption in selftest
@ 2016-11-24 11:10 Dan Carpenter
2016-11-26 6:22 ` Dilger, Andreas
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-11-24 11:10 UTC (permalink / raw)
To: lustre-devel
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>
diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
index f2d11fa..f750b9c 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] staging: lustre: lnet: memory corruption in selftest
2016-11-24 11:10 [patch] staging: lustre: lnet: memory corruption in selftest Dan Carpenter
@ 2016-11-26 6:22 ` Dilger, Andreas
0 siblings, 0 replies; 2+ messages in thread
From: Dilger, Andreas @ 2016-11-26 6:22 UTC (permalink / raw)
To: lustre-devel
On Nov 24, 2016, at 04:10, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
>
> diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
> index f2d11fa..f750b9c 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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-26 6:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-24 11:10 [patch] staging: lustre: lnet: memory corruption in selftest Dan Carpenter
2016-11-26 6:22 ` Dilger, Andreas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox