Skip to content

Commit 1d22f78

Browse files
committed
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/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents f937193 + b12e924 commit 1d22f78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

net/ieee802154/socket.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
251251
return -EOPNOTSUPP;
252252
}
253253

254-
if (!size)
255-
return -EINVAL;
256-
257254
lock_sock(sk);
258255
if (!sk->sk_bound_dev_if)
259256
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)
275272
err = -EMSGSIZE;
276273
goto out_dev;
277274
}
275+
if (!size) {
276+
err = 0;
277+
goto out_dev;
278+
}
278279

279280
hlen = LL_RESERVED_SPACE(dev);
280281
tlen = dev->needed_tailroom;

0 commit comments

Comments
 (0)