mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
virtio: bugfixes
A couple of bugfixes: one for a regression. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmWJgx4PHG1zdEByZWRo YXQuY29tAAoJECgfDbjSjVRpGDwH+gMIAqB3Zvyps9EILCWRMkqnu33X0TQ4IcNo P8pELD/YeuBo27dBRIAuITvtBr8UB6Yo0DYswQilN2hD9mQJ31Ky8gBTxDF7ZKdX wz3kXUOGMYWJvmLet0+/Z+h3+4IZPw7x4pTA8aILHIVTAloICr3v9lejlnDxliow AiermjEr8DhchEArgolWTTHRkpSqxMfnCqT/D+z+sB//kPH8iiHX0H2lgA1q2Nl2 mHsarYuOn/FWdeCz3wrifR9SGWFxEcs2LjMyXGb4LdgYtjpyPWLimTHVZma0KWws aiyxGwjim7EgBgNDVD/W++CZnp893aPH/VXN2q2KZq+JiOhhbRg= =Xffz -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "A couple of bugfixes: one for a regression" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_blk: fix snprintf truncation compiler warning virtio_ring: fix syncs DMA memory with different direction
This commit is contained in:
commit
fbafc3e621
|
|
@ -1019,12 +1019,12 @@ static void virtblk_config_changed(struct virtio_device *vdev)
|
|||
static int init_vq(struct virtio_blk *vblk)
|
||||
{
|
||||
int err;
|
||||
int i;
|
||||
unsigned short i;
|
||||
vq_callback_t **callbacks;
|
||||
const char **names;
|
||||
struct virtqueue **vqs;
|
||||
unsigned short num_vqs;
|
||||
unsigned int num_poll_vqs;
|
||||
unsigned short num_poll_vqs;
|
||||
struct virtio_device *vdev = vblk->vdev;
|
||||
struct irq_affinity desc = { 0, };
|
||||
|
||||
|
|
@ -1068,13 +1068,13 @@ static int init_vq(struct virtio_blk *vblk)
|
|||
|
||||
for (i = 0; i < num_vqs - num_poll_vqs; i++) {
|
||||
callbacks[i] = virtblk_done;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%d", i);
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
for (; i < num_vqs; i++) {
|
||||
callbacks[i] = NULL;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3219,8 +3219,7 @@ void virtqueue_dma_sync_single_range_for_cpu(struct virtqueue *_vq,
|
|||
if (!vq->use_dma_api)
|
||||
return;
|
||||
|
||||
dma_sync_single_range_for_cpu(dev, addr, offset, size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_cpu);
|
||||
|
||||
|
|
@ -3246,8 +3245,7 @@ void virtqueue_dma_sync_single_range_for_device(struct virtqueue *_vq,
|
|||
if (!vq->use_dma_api)
|
||||
return;
|
||||
|
||||
dma_sync_single_range_for_device(dev, addr, offset, size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
dma_sync_single_range_for_device(dev, addr, offset, size, dir);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_device);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user