diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-10-06 05:38:46 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-10-06 05:38:46 +0200 |
commit | 1d22f78d05737ce21bff7b88b6e58873f35e65ba (patch) | |
tree | cf86ff23f29e34c69a2568ebe09b4dfd025baf52 /net | |
parent | net: ethernet: adi: adin1110: Add check in netdev_event (diff) | |
parent | net/ieee802154: don't warn zero-sized raw_sendmsg() (diff) | |
download | linux-1d22f78d05737ce21bff7b88b6e58873f35e65ba.tar.xz linux-1d22f78d05737ce21bff7b88b6e58873f35e65ba.zip |
Merge tag 'ieee802154-for-net-2022-10-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
Stefan Schmidt says:
====================
pull-request: ieee802154 for net 2022-10-05
Only two patches this time around. A revert from Alexander Aring to a patch
that hit net and the updated patch to fix the problem from Tetsuo Handa.
* tag 'ieee802154-for-net-2022-10-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan:
net/ieee802154: don't warn zero-sized raw_sendmsg()
Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
====================
Link: https://lore.kernel.org/r/20221005144508.787376-1-stefan@datenfreihafen.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee802154/socket.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c index cbd0e2ac4ffe..6e55fae4c686 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); @@ -275,6 +272,10 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size) err = -EMSGSIZE; goto out_dev; } + if (!size) { + err = 0; + goto out_dev; + } hlen = LL_RESERVED_SPACE(dev); tlen = dev->needed_tailroom; |