提交 1df75154 编写于 作者: A Alexander Aring 提交者: Jialin Zhang

Revert "net/ieee802154: reject zero-sized raw_sendmsg()"

stable inclusion
from stable-v5.10.150
commit a96336a5f28b91eba4c5575e0434cbf02d8597fd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a96336a5f28b91eba4c5575e0434cbf02d8597fd

--------------------------------

[ Upstream commit 2eb2756f ]

This reverts commit 3a4d061c.

There is a v2 which does return zero if zero length is given.
Signed-off-by: NAlexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20221005014750.3685555-1-aahringo@redhat.comSigned-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 93db290a
...@@ -252,9 +252,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size) ...@@ -252,9 +252,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
if (!size)
return -EINVAL;
lock_sock(sk); lock_sock(sk);
if (!sk->sk_bound_dev_if) if (!sk->sk_bound_dev_if)
dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154); dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册