drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE

From: kbuild test robot
Date: Sat Mar 12 2016 - 21:52:29 EST


Hi Michael,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fda604a4daa19ead458ce5471892fa1d4b382d82
commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
date: 1 year, 2 months ago
config: openrisc-allmodconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
# save the attached .config to linux build tree
make.cross ARCH=openrisc

All errors (new ones prefixed by >>):

drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
>> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE

vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c

712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
713 r = -EFAULT;
714 break;
715 }
716
717 /* Make sure it's safe to cast pointers to vring types. */
> 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data