Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932086AbbG3SQj (ORCPT ); Thu, 30 Jul 2015 14:16:39 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:40245 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755539AbbG3SQh (ORCPT ); Thu, 30 Jul 2015 14:16:37 -0400 Date: Thu, 30 Jul 2015 11:16:36 -0700 (PDT) Message-Id: <20150730.111636.2181952489319443707.davem@davemloft.net> To: m.grzeschik@pengutronix.de Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] ARCNET: fix hard_header_len limit From: David Miller In-Reply-To: <1438263276-26202-1-git-send-email-m.grzeschik@pengutronix.de> References: <1438263276-26202-1-git-send-email-m.grzeschik@pengutronix.de> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 30 Jul 2015 11:16:37 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1066 Lines: 23 From: Michael Grzeschik Date: Thu, 30 Jul 2015 15:34:36 +0200 > The commit <9c7077622dd9> ("packet: make packet_snd fail on len smaller > than l2 header") adds the check for minimum packet length of the used l2. > For arcnet the hardware header length is not the complete archdr which > includes hard + soft header. This patch changes the length to > sizeof(arc_hardware). > > Signed-off-by: Michael Grzeschik The hard header len is used for other purposes as well, are you sure those don't get broken by this change? Code assumes that if the data at the SKB mac pointer is taken, for dev->hard_header_len bytes, that is exactly the link layer header. And that this can be used to compare two MAC headers, copy the MAC header from one packet to another, etc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/