From patchwork Wed Oct 19 08:35:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4966 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226791wrs; Wed, 19 Oct 2022 02:46:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vP9327/mlwRx1SbNRv9oOegCZYSyueoa8CN2Vpo5BtO5pe8mntbkkvO0PFPG5phAiH1aQ X-Received: by 2002:a05:6a00:1707:b0:562:e790:dfc3 with SMTP id h7-20020a056a00170700b00562e790dfc3mr7764495pfc.59.1666172814288; Wed, 19 Oct 2022 02:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172814; cv=none; d=google.com; s=arc-20160816; b=Rt5DUDKHvoZrb79IsIutTOpWVQl3wzTYZSeHl7R0A7bcnNJ5z+q52eqQ/8wbMW8guw pH0GuFlEQK9h+oOS2bUQ2+Zabtf6e0lqR/gTVeNIn6xbbWtI/Rc6RGPenp5fAkVM5pDP vs0+2emY1l2Al3yNYaeMST1ExtfUgZNa1JCx3a2FHiDAE//KpjTFpC7pN0XDApCv2/lo w4oXfz15d6DARfq/bSmJ16+hBs/DHx2mdDUCElyLDmvDcPgq41fEl4kI4MwTglhtet47 DHYQRNF8vcChgU26Qq5f8dTQ8Ku6vcuaeyvw3QD6GEjB3FVH9Uj7bjRWnzkbuUM6ubBU RwZw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a170902d20200b0017a09cc694dsi16208302ply.561.2022.10.19.02.46.41; Wed, 19 Oct 2022 02:46:54 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108824463595532?= X-GMAIL-MSGID: =?utf-8?q?1747108824463595532?= 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);