LU-18170 obdclass: replace round_up(*_inllenX*) with ALIGN
This patch fixes the following Coverity error:
2648 bufs = ioc_data->ioc_inllen4 +
2649 round_up(ioc_data->ioc_inllen1, 8) +
CID 451715: Integer handling issues (INTEGER_OVERFLOW)
Expression "ioc_data->ioc_inllen2 - 1U", which is equal to
4294967295,
where "ioc_data->ioc_inllen2" is known to be equal to 0, underflows
the type that receives it, an unsigned integer 32 bits wide.
2650 round_up(ioc_data->ioc_inllen2, 8) +
2651 round_up(ioc_data->ioc_inllen3, 8);
ioc_inllenX are unsigned so round_up() macro can underflow if the
value is set to 0.
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
So this patch replaces round_up() with ALIGN() to align ioctl buffer
sizes to 8 bytes.
Fixes:
5ad117fc6f ("LU-18170 obdclass: fix llog_print_cb()")
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I47e42f581aa76b71c23c7cfec42b9f2589f23f2b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57354
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>