lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6.0 854/862] Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
    Date
    From: Alexander Aring <aahringo@redhat.com>

    [ Upstream commit 2eb2756f6c9e9621e022d78321ce40a62c4520b5 ]

    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>
    Link: https://lore.kernel.org/r/20221005014750.3685555-1-aahringo@redhat.com
    Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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);
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-10-19 11:45    [W:4.167 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site