From mboxrd@z Thu Jan 1 00:00:00 1970 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 D3EC9C001DF for ; Thu, 3 Aug 2023 12:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbjHCMOJ (ORCPT ); Thu, 3 Aug 2023 08:14:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234168AbjHCMOI (ORCPT ); Thu, 3 Aug 2023 08:14:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F2CBA; Thu, 3 Aug 2023 05:14:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D5C2861D72; Thu, 3 Aug 2023 12:14:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78C6CC433C8; Thu, 3 Aug 2023 12:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691064846; bh=8Va26m7fbnJ/ST39Sj+/utRZQ0R99ngg6Awok+mes2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dA/MX1ZxNEyGdlcc9k40RYQ90f6hRY7tsIc4PDMYzYfOdXGBQ7t4kja5gLrs/KxgN BjSZ1pZ2K9yTIqMM0YloCimfpjNZkAyg0DrJ5ULSojw1jtkFsaaRMhtBam4/tjd56O C6F9KfiUhbLOvgXps2/R31w7RifUWbJdG2+qlwJ+vvrbq4YGAgsOV7XQ7e7h31MDhN VXreudJ8GRNDgCMn9AqspkFCOAHb/yiHb8qbEaIaKsfWY3aN8m8t2GZYiLXA9XS36X zffWN90Vjhf6iw5rcVcb2aZZ2Sx/MR2ZO/LvUzGSu7MuE/ZzV9gzohy2qz+lzcloF6 SNgk4H9c2AZLA== Date: Thu, 3 Aug 2023 14:14:01 +0200 From: Simon Horman To: Sonia Sharma Cc: linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, sosha@microsoft.com, kys@microsoft.com, mikelley@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Subject: Re: [PATCH v3 net] net: hv_netvsc: fix netvsc_send_completion to avoid multiple message length checks Message-ID: References: <1691023528-5270-1-git-send-email-sosha@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1691023528-5270-1-git-send-email-sosha@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Wed, Aug 02, 2023 at 05:45:28PM -0700, Sonia Sharma wrote: > From: Sonia Sharma > > The switch statement in netvsc_send_completion() is incorrectly validating > the length of incoming network packets by falling through to the next case. > Avoid the fallthrough. Instead break after a case match and then process > the complete() call. > > Signed-off-by: Sonia Sharma Hi Sonia, if this is a bug-fix, which seems to be the case, then it probably warrants a Fixes tag.