From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] vmxnet3: fix incorrect dereference when rxvlan is disabled Date: Thu, 19 Apr 2018 13:59:55 -0400 (EDT) Message-ID: <20180419.135955.1394035686984705882.davem@davemloft.net> References: <20180418194805.29119-1-doshir@vmware.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, pv-drivers@vmware.com, linux-kernel@vger.kernel.org To: doshir@vmware.com Return-path: In-Reply-To: <20180418194805.29119-1-doshir@vmware.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Ronak Doshi Date: Wed, 18 Apr 2018 12:48:04 -0700 > vmxnet3_get_hdr_len() is used to calculate the header length which in > turn is used to calculate the gso_size for skb. When rxvlan offload is > disabled, vlan tag is present in the header and the function references > ip header from sizeof(ethhdr) and leads to incorrect pointer reference. > > This patch fixes this issue by taking sizeof(vlan_ethhdr) into account > if vlan tag is present and correctly references the ip hdr. > > Signed-off-by: Ronak Doshi > Acked-by: Guolin Yang > Acked-by: Louis Luo Applied and queued up for -stable, thanks. Please provide an appropriate Fixes: tag next time.