From: Christian Gromm Date: Mon, 3 Aug 2015 11:44:30 +0000 (+0200) Subject: Staging: most: avoid possible integer overflow X-Git-Tag: v4.3-rc1~158^2~275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ae0751007cdf2deaa87e160f28c50a00b478883;p=platform%2Fkernel%2Flinux-exynos.git Staging: most: avoid possible integer overflow This patch prevents a potential integer overlow. Reported-by: Dan Carpenter Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index f872dc0..f4fea8c 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -1260,7 +1260,7 @@ int arm_mbo_chain(struct most_c_obj *c, int dir, void (*compl)(struct mbo *)) unsigned int i; int retval; struct mbo *mbo; - u16 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len; + u32 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len; atomic_set(&c->mbo_nq_level, 0);