lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3cd56d3a-85f0-9cce-d42f-f4eace84667b@redhat.com>
Date:	Sun, 19 Jun 2016 00:10:32 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Bob Liu <bob.liu@...cle.com>, linux-kernel@...r.kernel.org
Cc:	virtualization@...ts.linux-foundation.org, mst@...hat.com
Subject: Re: [PATCH] drivers: virtio_blk: notify blk-core when hw-queue number
 changes



On 13/06/2016 11:58, Bob Liu wrote:
> A guest might be migrated to other hosts with different num_queues, the
> blk-core should aware of that else the reference of &vblk->vqs[qid] may be wrong.
> 
> Signed-off-by: Bob Liu <bob.liu@...cle.com>
> ---
>  drivers/block/virtio_blk.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 42758b5..c169238 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -819,6 +819,9 @@ static int virtblk_restore(struct virtio_device *vdev)
>  	if (ret)
>  		return ret;
>  
> +	if (vblk->num_vqs != vblk->tag_set.nr_hw_queues)
> +		blk_mq_update_nr_hw_queues(&vblk->tag_set, vblk->num_vqs);
> +
>  	virtio_device_ready(vdev);
>  
>  	blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);
> 

This should never happen; it'd be a configuration problem.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ