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] [day] [month] [year] [list]
Message-ID: <151e4f4b-d3e9-5d46-d17f-04346a203f0e@gmail.com>
Date:   Wed, 23 Jun 2021 12:50:13 +0200
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     13145886936@....com, davem@...emloft.net, kuba@...nel.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        gushengxian <gushengxian@...ong.com>
Subject: Re: [PATCH] net: caif: add a return statement



On 6/23/21 3:32 AM, 13145886936@....com wrote:
> From: gushengxian <gushengxian@...ong.com>
> 
> Return statement is needed in every condition in Int function.


??? Are you a bot ??

Is it a real patch. How was it tested ?

> Fixed some grammar issues.
> 
> Signed-off-by: gushengxian <gushengxian@...ong.com>
> ---
>  net/caif/caif_socket.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
> index 3ad0a1df6712..84a00b9cb0dc 100644
> --- a/net/caif/caif_socket.c
> +++ b/net/caif/caif_socket.c
> @@ -281,7 +281,7 @@ static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
>  	if (flags & MSG_OOB)
>  		goto read_error;
>  
> -	skb = skb_recv_datagram(sk, flags, 0 , &ret);
> +	skb = skb_recv_datagram(sk, flags, 0, &ret);
>  	if (!skb)
>  		goto read_error;
>  	copylen = skb->len;
> @@ -295,6 +295,7 @@ static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
>  		goto out_free;
>  
>  	ret = (flags & MSG_TRUNC) ? skb->len : copylen;
> +	return ret;

This is completely bogus.

>  out_free:
>  	skb_free_datagram(sk, skb);
>  	caif_check_flow_release(sk);
> @@ -615,7 +616,7 @@ static int caif_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>  
>  	while (sent < len) {
>  
> -		size = len-sent;
> +		size = len - sent;
>  
>  		if (size > cf_sk->maxframe)
>  			size = cf_sk->maxframe;
> @@ -815,8 +816,8 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
>  	sock->state = SS_CONNECTING;
>  	sk->sk_state = CAIF_CONNECTING;
>  
> -	/* Check priority value comming from socket */
> -	/* if priority value is out of range it will be ajusted */
> +	/* Check priority value coming from socket */
> +	/* if priority value is out of range it will be adjusted */
>  	if (cf_sk->sk.sk_priority > CAIF_PRIO_MAX)
>  		cf_sk->conn_req.priority = CAIF_PRIO_MAX;
>  	else if (cf_sk->sk.sk_priority < CAIF_PRIO_MIN)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ