diff mbox series

[net,1/2] Revert "net/ieee802154: reject zero-sized raw_sendmsg()"

Message ID 20221005014750.3685555-1-aahringo@redhat.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [net,1/2] Revert "net/ieee802154: reject zero-sized raw_sendmsg()" | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: alex.aring@gmail.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alexander Aring Oct. 5, 2022, 1:47 a.m. UTC
This reverts commit 3a4d061c699bd3eedc80dc97a4b2a2e1af83c6f5.

There is a v2 which does return zero if zero length is given.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 net/ieee802154/socket.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Stefan Schmidt Oct. 5, 2022, 10:57 a.m. UTC | #1
Hello.

On 05.10.22 03:47, Alexander Aring wrote:
> This reverts commit 3a4d061c699bd3eedc80dc97a4b2a2e1af83c6f5.
> 
> There is a v2 which does return zero if zero length is given.
> 
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
>   net/ieee802154/socket.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
> index cbd0e2ac4ffe..7889e1ef7fad 100644
> --- a/net/ieee802154/socket.c
> +++ b/net/ieee802154/socket.c
> @@ -251,9 +251,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
>   		return -EOPNOTSUPP;
>   	}
>   
> -	if (!size)
> -		return -EINVAL;
> -
>   	lock_sock(sk);
>   	if (!sk->sk_bound_dev_if)
>   		dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);

This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!

regards
Stefan Schmidt
diff mbox series

Patch

diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index cbd0e2ac4ffe..7889e1ef7fad 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -251,9 +251,6 @@  static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
 		return -EOPNOTSUPP;
 	}
 
-	if (!size)
-		return -EINVAL;
-
 	lock_sock(sk);
 	if (!sk->sk_bound_dev_if)
 		dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);