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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <PH0PR18MB4474392FB2C0EEA2085C1E71DEF12@PH0PR18MB4474.namprd18.prod.outlook.com>
Date: Tue, 28 May 2024 08:31:08 +0000
From: Hariprasad Kelam <hkelam@...vell.com>
To: Heng Qi <hengqi@...ux.alibaba.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "virtualization@...ts.linux.dev"
	<virtualization@...ts.linux.dev>
CC: "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>,
        Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
        Eugenio Pérez
	<eperezma@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet
	<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni
	<pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>,
        Daniel Jurgens
	<danielj@...dia.com>
Subject: [PATCH net 1/2] virtio_net: rename ret to err



> -----Original Message-----
> From: Heng Qi <hengqi@...ux.alibaba.com>
> Sent: Tuesday, May 28, 2024 1:22 PM
> To: netdev@...r.kernel.org; virtualization@...ts.linux.dev
> Cc: Michael S. Tsirkin <mst@...hat.com>; Jason Wang
> <jasowang@...hat.com>; Xuan Zhuo <xuanzhuo@...ux.alibaba.com>;
> Eugenio Pérez <eperezma@...hat.com>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub
> Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Jiri Pirko
> <jiri@...nulli.us>; Daniel Jurgens <danielj@...dia.com>
> Subject: [EXTERNAL] [PATCH net 1/2] virtio_net: rename ret to err
> 
> Prioritize security for external emails: Confirm sender and content safety
> before clicking links or opening attachments
> 
> ----------------------------------------------------------------------
> The integer variable 'ret', denoting the return code, is mismatched with the
> boolean return type of virtnet_send_command_reply(); hence, it is renamed
> to 'err'.
> 
> The usage of 'ret' is deferred to the next patch.
> 
> Signed-off-by: Heng Qi <hengqi@...ux.alibaba.com>
> ---
>  drivers/net/virtio_net.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index
> 4a802c0ea2cb..6b0512a628e0 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2686,7 +2686,7 @@ static bool virtnet_send_command_reply(struct
> virtnet_info *vi, u8 class, u8 cmd  {
>  	struct scatterlist *sgs[5], hdr, stat;
>  	u32 out_num = 0, tmp, in_num = 0;
> -	int ret;
> +	int err;
> 
>  	/* Caller should know better */
>  	BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ));
> @@ -2710,10 +2710,10 @@ static bool virtnet_send_command_reply(struct
> virtnet_info *vi, u8 class, u8 cmd
>  		sgs[out_num + in_num++] = in;
> 
>  	BUG_ON(out_num + in_num > ARRAY_SIZE(sgs));
> -	ret = virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, vi,
> GFP_ATOMIC);
> -	if (ret < 0) {
> +	err = virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, vi,
> GFP_ATOMIC);
> +	if (err < 0) {
>  		dev_warn(&vi->vdev->dev,
> -			 "Failed to add sgs for command vq: %d\n.", ret);
> +			 "Failed to add sgs for command vq: %d\n.", err);
>  		mutex_unlock(&vi->cvq_lock);
>  		return false;
>  	}
> --
> 2.32.0.3.g01195cf9f
> 
Reviewed-by: Hariprasad Kelam <hkelam@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ