Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp820165rwi; Wed, 19 Oct 2022 03:27:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UyhmRgX6sHizoE3ceg0JVuy8t5YqmsJdH9vA3jI7SmJXpd64yQusV2+XAOdmt6LAFI7CP X-Received: by 2002:a17:906:5dac:b0:791:93de:c61d with SMTP id n12-20020a1709065dac00b0079193dec61dmr5957416ejv.751.1666175248354; Wed, 19 Oct 2022 03:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175248; cv=none; d=google.com; s=arc-20160816; b=wiHZ2CM5Dy9c6fYOmvWc9WfNZXgesWwAF+Z88jOpCTBvvQ62/pUeNgv3XpYVu87AiW 8AGMdAxtswDCZwFzZjZRjcdJOzaWrisvzBDiw7gJ1HAq8HBuFX61eMAj5DlhC2lmz2Oa MdWkhaBH2/aIFrjEM4vl9ZC5h3w6ggH6xNfrqcWciIKM+8jYlzYzAuYQmDT6ArL3w3JL C7Px8v9S5+7Ol/u2mf10bBm/a5GkuRuf2VzNr15HhZlwK6Dzvfr6w61VgqY1HAyDWLLt XJ+r2h4kmxHf60JFcWeqcICAher4TVYKt3PTU46wodgoWJbH1qFY0wEQTJeZDBILR3ax jVTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nMJgdHT//sk6P9l3GtimaUZXH38U6bYfUMEFfCXiD6I=; b=fobSAeaK1PL7Oph4skH1i0wgvdGSkPbmXjbCg0a1rjvzvvycnrZLPsWhCZ8CmTj/1I P57oCT/o3ZE+ygEu+vIh6EJPnR12PEAliCnLMm1RfqDqi1UOlHXBd7TQhUXdQ9jdO64S PZE+dh4xF9nk1f7LUBwsRgr0XOZsmbuamTwoQcerJfByE180RHft07bW79D87bMyRTbX n0u72pXHwiFeBFn7n3NYdwOmX/gqaxm+tRgIGHYZO5GUV+rGvipDnJbCSHe11c781pHD 7rxgncL1p8LdN/d7yXnl91QqgMP1/XcP9Tk/NWtMa1mOwRcDrhWd/9EWSmPZkSLSzmFY WPKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qcDJXkLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu13-20020a170906eecd00b0078daf101aa1si13326084ejb.813.2022.10.19.03.27.02; Wed, 19 Oct 2022 03:27:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qcDJXkLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234495AbiJSJoS (ORCPT + 99 others); Wed, 19 Oct 2022 05:44:18 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } - if (!size) - return -EINVAL; - lock_sock(sk); if (!sk->sk_bound_dev_if) dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154); -- 2.35.1