Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fixes from Michael Tsirkin: "Some bugfixes that seem important and safe enough to merge at the last minute" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: fix another race between migration and ballooning tools/virtio: add kmalloc_array stub tools/virtio: add dma barrier stubs
This commit is contained in:
@@ -513,7 +513,9 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,
|
||||
tell_host(vb, vb->inflate_vq);
|
||||
|
||||
/* balloon's page migration 2nd step -- deflate "page" */
|
||||
spin_lock_irqsave(&vb_dev_info->pages_lock, flags);
|
||||
balloon_page_delete(page);
|
||||
spin_unlock_irqrestore(&vb_dev_info->pages_lock, flags);
|
||||
vb->num_pfns = VIRTIO_BALLOON_PAGES_PER_PAGE;
|
||||
set_page_pfns(vb, vb->pfns, page);
|
||||
tell_host(vb, vb->deflate_vq);
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
} while (0);
|
||||
/* Weak barriers should be used. If not - it's a bug */
|
||||
# define mb() abort()
|
||||
# define rmb() abort()
|
||||
# define wmb() abort()
|
||||
# define dma_rmb() abort()
|
||||
# define dma_wmb() abort()
|
||||
#else
|
||||
#error Please fill in barrier macros
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
|
||||
return __kmalloc_fake;
|
||||
return malloc(s);
|
||||
}
|
||||
static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
|
||||
{
|
||||
return kmalloc(n * s, gfp);
|
||||
}
|
||||
|
||||
static inline void *kzalloc(size_t s, gfp_t gfp)
|
||||
{
|
||||
void *p = kmalloc(s, gfp);
|
||||
|
||||
Reference in New Issue
Block a user