From patchwork Sat Oct 22 07:29:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7781 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1121497wrr; Sat, 22 Oct 2022 02:28:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6dOsbr1xMPz1TWh6fiYnBeZ1ZEmEBmsT6MB47Kma2bMcD+s26YFPb/qvw1oXqnxFwZznse X-Received: by 2002:a17:903:2490:b0:17f:bf7e:c521 with SMTP id p16-20020a170903249000b0017fbf7ec521mr23312408plw.161.1666430925987; Sat, 22 Oct 2022 02:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666430925; cv=none; d=google.com; s=arc-20160816; b=FHSUddBx/BtGxfI0XfoHGcr+rvowqmsBLkAlGCP19rFipgENwBOiJC+JTZqj5K4kOc 88DJgzBa7G4X/prisYophT9nnrEsFcoUDXB1TgfJT4GrntJ6RsCEYYKTcy5GIrXiG8pJ hJ9fTBHUfvcEXRS0PXPCQ36DpqUUYd5UrLxIZGZM4vs3YJ77SbiDv1k1uFE4rVc3+FWO W/1ue0Mw0a3TIcjrB11TE9ZESiS26ITqJTnr5pEKzvSUQrc9sYqFmuoG3uMjF8vGpPxT bvGlbo/cFuR+zpHBPeSXdpzP6F4jZHGUxjlDhdDAdnfPPvjyJXpi0vtRby6Hf1lqG4zG uBzw== 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=bZ1rDYZg+tt9oCiaaDSB+b4xJ5uHWdmthluZ+LGp1w/H1LAKCi5fCwEr5xX2vx/oVh 9zLrRpXbY0CSDRx4/W4PbOYu4TIASWo4yW4YDD/CD6C+YwdUSm5AwyoFxQmlbqngMqJP oX4e5m7Zlui22KHevnMx9mxRjgJ1nuZjzfRVXXxCmy+fbs/10S25Wk+i6eP6s5ghAPIe X1w5VtNWB8+fwRRbq8M+TUAEDnGgITVaTkTqRFQuPvvZ6RTv9LhcUMcx0JTxWpBwG+zT 48W4ZSQw6fI0OQb0XiORsB3lezY1m4VV8URjbQXZlCLxCqUpCvl5Oy9Fpjvwcr+23b3W oIaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tPpJ7uzJ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a170902ec8a00b0016f5e7d0febsi33261222plg.244.2022.10.22.02.28.33; Sat, 22 Oct 2022 02:28:45 -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=tPpJ7uzJ; 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 S232097AbiJVJGH (ORCPT + 99 others); Sat, 22 Oct 2022 05:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234135AbiJVJEj (ORCPT ); Sat, 22 Oct 2022 05:04:39 -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 C2A891B7B0; Sat, 22 Oct 2022 01:19:57 -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 BEAF760B9A; Sat, 22 Oct 2022 08:07:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85AA5C433D7; Sat, 22 Oct 2022 08:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666426060; bh=cevrSgJp5/K+gljJsjmLJh8wwK0TipvFRgrsfKwaDf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tPpJ7uzJ2RkAWj6iMiy3s/mFIilAvBVFXLjS1hUzrw/9mg89n6S+O8PNZquHnzHFk pAWhbKBeNSNPKpvfE1yHgaytNPwnCYXE+/WPOOOkLsglWJN6RWAl/9tx9urUNH/LHt PpApmNtx/vWnS2SvJuCWrBTO3++gPDyOJeIkMZGE= 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 5.19 705/717] Revert "net/ieee802154: reject zero-sized raw_sendmsg()" Date: Sat, 22 Oct 2022 09:29:44 +0200 Message-Id: <20221022072529.625640698@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747379474719091548?= X-GMAIL-MSGID: =?utf-8?q?1747379474719091548?= 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);