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]
Date:   Wed, 18 Nov 2020 18:45:57 +0800
From:   "wanghai (M)" <wanghai38@...wei.com>
To:     <shuah@...nel.org>, <pintu.ping@...il.com>
CC:     <linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] android/ion: fix error return code in opensocket()

There is a syntax problem with this patch, please ignore it!

在 2020/11/18 18:39, Wang Hai 写道:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 47a18c42d992 ("android/ion: userspace test utility for ion buffer sharing")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.com>
> ---
>   tools/testing/selftests/android/ion/ipcsocket.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/android/ion/ipcsocket.c b/tools/testing/selftests/android/ion/ipcsocket.c
> index 7dc521002095..268e6b610357 100644
> --- a/tools/testing/selftests/android/ion/ipcsocket.c
> +++ b/tools/testing/selftests/android/ion/ipcsocket.c
> @@ -28,8 +28,9 @@ int opensocket(int *sockfd, const char *name, int connecttype)
>   	}
>   
>   	*sockfd = ret;
> -	if (setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR,
> -		(char *)&temp, sizeof(int)) < 0) {
> +	ret = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&temp,
> +			 sizeof(int))
> +	if (ret < 0) {
>   		fprintf(stderr, "<%s>: Failed setsockopt: <%s>\n",
>   		__func__, strerror(errno));
>   		goto err;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ