From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D80001F937 for ; Thu, 3 Aug 2023 17:23:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD5C7C433C8; Thu, 3 Aug 2023 17:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691083395; bh=y8eGtQQgDapSBxqm5rIyj31sufYbaMEgXLeK19zO7LI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TV3mGJLBxAKOBcjGquYn6Gmjq5TTuB4Rk54K0nNdkJ1siAAM/5vGB2E+7iMCzVCme n9nXIb/CClmNhi6ktroMwe4JvPmRFSFr27xkNFHdKsm2ZZUuHjLBm4XWoOwahOUcW4 4sj8DuAAoqVO2oD9Q6uB18ShOzdXg2sjN9k7UjJgR6S0nGPqp2WXSWSqLmh4nBLb0M DbXUCm220kMgBYoWGauX8beHsnG80zR6F+j0jEzqZHIUOwOnx8oZyB8nUXt+CnVTmd sNcVnhoCz0DaVqMXqo1MeCZJlsjpURrhifAEm+/idcGd+m1n+CB+0+lxETSXaGb8bW vfQtqWR4pGQLA== Date: Thu, 3 Aug 2023 10:23:14 -0700 From: Jakub Kicinski To: Simon Horman Cc: Sonia Sharma , 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, pabeni@redhat.com Subject: Re: [PATCH v3 net] net: hv_netvsc: fix netvsc_send_completion to avoid multiple message length checks Message-ID: <20230803102314.768b6462@kernel.org> In-Reply-To: References: <1691023528-5270-1-git-send-email-sosha@linux.microsoft.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 3 Aug 2023 14:14:01 +0200 Simon Horman wrote: > > 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. And a description of what this problem results in. The commit message kinda tells us what the patch does, which we already see from the code. Paraphrasing corporate America "focus on the impact"... -- pw-bot: cr