From nobody Sun Oct 19 06:10:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3123C4321E for ; Wed, 19 Oct 2022 09:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234504AbiJSJoT (ORCPT ); Wed, 19 Oct 2022 05:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234576AbiJSJkr (ORCPT ); Wed, 19 Oct 2022 05:40:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89530F0355; Wed, 19 Oct 2022 02:17:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C363617EC; Wed, 19 Oct 2022 09:16:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51E50C433C1; Wed, 19 Oct 2022 09:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170995; bh=cevrSgJp5/K+gljJsjmLJh8wwK0TipvFRgrsfKwaDf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qcDJXkLpx2F1L0UT82hgswRruWgMU4B1RjbgtKnWC7S/bjc74PaCf4gnzuCi+6WyN EdK7VL2HwmR7ISC7w3ukPIQRIZvNtigc8o4SrobYEJo0R+DBCuHi+HUnXcIYIyiWot 6UUYPSVqDTWTLhHLVW0GCFePWfIaLNErOTG7tnWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Aring , Stefan Schmidt , Sasha Levin Subject: [PATCH 6.0 854/862] Revert "net/ieee802154: reject zero-sized raw_sendmsg()" Date: Wed, 19 Oct 2022 10:35:41 +0200 Message-Id: <20221019083327.603406007@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexander Aring [ 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 Link: https://lore.kernel.org/r/20221005014750.3685555-1-aahringo@redhat.com Signed-off-by: Stefan Schmidt Signed-off-by: Sasha Levin --- 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; } =20 - if (!size) - return -EINVAL; - lock_sock(sk); if (!sk->sk_bound_dev_if) dev =3D dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154); --=20 2.35.1