tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   74d5d28b9903cd48c22c04f887354a3d49621c13
commit: 47349198d7a879febab785a00c39c2de379f35c2 [1/9] virtio_balloon: fix 
deadlock on OOM
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 47349198d7a879febab785a00c39c2de379f35c2
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers//virtio/virtio_balloon.c: In function 'fill_balloon':
>> drivers//virtio/virtio_balloon.c:167:3: error: implicit declaration of 
>> function 'balloon_page_push'; did you mean 'balloon_page_putback'? 
>> [-Werror=implicit-function-declaration]
      balloon_page_push(&pages, page);
      ^~~~~~~~~~~~~~~~~
      balloon_page_putback
>> drivers//virtio/virtio_balloon.c:174:17: error: implicit declaration of 
>> function 'balloon_page_pop'; did you mean 'balloon_page_alloc'? 
>> [-Werror=implicit-function-declaration]
     while ((page = balloon_page_pop(&pages))) {
                    ^~~~~~~~~~~~~~~~
                    balloon_page_alloc
   drivers//virtio/virtio_balloon.c:174:15: warning: assignment makes pointer 
from integer without a cast [-Wint-conversion]
     while ((page = balloon_page_pop(&pages))) {
                  ^
   cc1: some warnings being treated as errors

vim +167 drivers//virtio/virtio_balloon.c

   143  
   144  static unsigned fill_balloon(struct virtio_balloon *vb, size_t num)
   145  {
   146          unsigned num_allocated_pages;
   147          unsigned num_pfns;
   148          struct page *page;
   149          LIST_HEAD(pages);
   150  
   151          /* We can only do one array worth at a time. */
   152          num = min(num, ARRAY_SIZE(vb->pfns));
   153  
   154          for (num_pfns = 0; num_pfns < num;
   155               num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) {
   156                  struct page *page = balloon_page_alloc();
   157  
   158                  if (!page) {
   159                          dev_info_ratelimited(&vb->vdev->dev,
   160                                               "Out of puff! Can't get %u 
pages\n",
   161                                               
VIRTIO_BALLOON_PAGES_PER_PAGE);
   162                          /* Sleep for at least 1/5 of a second before 
retry. */
   163                          msleep(200);
   164                          break;
   165                  }
   166  
 > 167                  balloon_page_push(&pages, page);
   168          }
   169  
   170          mutex_lock(&vb->balloon_lock);
   171  
   172          vb->num_pfns = 0;
   173  
 > 174          while ((page = balloon_page_pop(&pages))) {
   175                  balloon_page_enqueue(&vb->vb_dev_info, page);
   176  
   177                  vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE;
   178  
   179                  set_page_pfns(vb, vb->pfns + vb->num_pfns, page);
   180                  vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE;
   181                  if (!virtio_has_feature(vb->vdev,
   182                                          
VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
   183                          adjust_managed_page_count(page, -1);
   184          }
   185  
   186          num_allocated_pages = vb->num_pfns;
   187          /* Did we get any? */
   188          if (vb->num_pfns != 0)
   189                  tell_host(vb, vb->inflate_vq);
   190          mutex_unlock(&vb->balloon_lock);
   191  
   192          return num_allocated_pages;
   193  }
   194  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to