From 12b93898d1c14e3aff6854aca8debb9bce3b5067 Mon Sep 17 00:00:00 2001 From: ligd Date: Mon, 11 Nov 2019 09:11:17 -0600 Subject: [PATCH] drivers/rptun/rptun.c: vring size should also be aligned. --- drivers/rptun/rptun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index 1d817d8573..c6dc3f4a27 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -426,8 +426,8 @@ static int rptun_dev_start(FAR struct remoteproc *rproc) align1 = B2C(rsc->rpmsg_vring1.align); tbsz = ALIGN_UP(sizeof(struct rptun_rsc_s), MAX(align0, align1)); - v0sz = vring_size(rsc->rpmsg_vring0.num, align0); - v1sz = vring_size(rsc->rpmsg_vring1.num, align1); + v0sz = ALIGN_UP(vring_size(rsc->rpmsg_vring0.num, align0), align0); + v1sz = ALIGN_UP(vring_size(rsc->rpmsg_vring1.num, align1), align1); va0 = (char *)rsc + tbsz; va1 = (char *)rsc + tbsz + v0sz;