From b423a6b1e38a799aa7db43646da132691bbb7903 Mon Sep 17 00:00:00 2001 From: zms123456 <85141075+zmshahaha@users.noreply.github.com> Date: Thu, 12 Sep 2024 06:04:05 +0800 Subject: [PATCH] [components][lwp]remove extra check in sys_bind --- components/lwp/lwp_syscall.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 8b8276ae63..57ea57cf4f 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -2880,23 +2880,12 @@ sysret_t sys_bind(int socket, const struct musl_sockaddr *name, socklen_t namele lwp_get_from_user(&family, (void *)name, 2); if (family == AF_UNIX) { - if (!lwp_user_accessable((void *)name, sizeof(struct sockaddr_un))) - { - return -EFAULT; - } - lwp_get_from_user(&un_addr, (void *)name, sizeof(struct sockaddr_un)); ret = bind(socket, (struct sockaddr *)&un_addr, namelen); } else if (family == AF_NETLINK) { - if (!lwp_user_accessable((void *)name, namelen)) - { - return -EFAULT; - } - lwp_get_from_user(&sa, (void *)name, namelen); - ret = bind(socket, &sa, namelen); } else