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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Feb 2013 18:14:52 +0800
From:	Wanlong Gao <gaowanlong@...fujitsu.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Paolo Bonzini <pbonzini@...hat.com>, Asias He <asias@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	linux-kernel@...r.kernel.org,
	virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH 14/16] virtio_rpmsg_bus: use simplified virtqueue accessors.

On 02/19/2013 03:56 PM, Rusty Russell wrote:
> We never add buffers with input and output parts, so use the new accessors.
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

Reviewed-by: Wanlong Gao <gaowanlong@...fujitsu.com>

> ---
>  drivers/rpmsg/virtio_rpmsg_bus.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
> index f1e3239..d9897d1 100644
> --- a/drivers/rpmsg/virtio_rpmsg_bus.c
> +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> @@ -763,14 +763,14 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst,
>  	mutex_lock(&vrp->tx_lock);
>  
>  	/* add message to the remote processor's virtqueue */
> -	err = virtqueue_add_buf(vrp->svq, &sg, 1, 0, msg, GFP_KERNEL);
> +	err = virtqueue_add_outbuf(vrp->svq, &sg, 1, msg, GFP_KERNEL);
>  	if (err) {
>  		/*
>  		 * need to reclaim the buffer here, otherwise it's lost
>  		 * (memory won't leak, but rpmsg won't use it again for TX).
>  		 * this will wait for a buffer management overhaul.
>  		 */
> -		dev_err(dev, "virtqueue_add_buf failed: %d\n", err);
> +		dev_err(dev, "virtqueue_add_outbuf failed: %d\n", err);
>  		goto out;
>  	}
>  
> @@ -845,7 +845,7 @@ static void rpmsg_recv_done(struct virtqueue *rvq)
>  	sg_init_one(&sg, msg, RPMSG_BUF_SIZE);
>  
>  	/* add the buffer back to the remote processor's virtqueue */
> -	err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, msg, GFP_KERNEL);
> +	err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, msg, GFP_KERNEL);
>  	if (err < 0) {
>  		dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
>  		return;
> @@ -976,7 +976,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
>  
>  		sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
>  
> -		err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, cpu_addr,
> +		err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
>  								GFP_KERNEL);
>  		WARN_ON(err); /* sanity check; this can't really happen */
>  	}
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ