From patchwork Mon Mar 9 18:21:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 24211 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 1C875DE0F6 for ; Tue, 10 Mar 2009 05:22:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849AbZCISWK (ORCPT ); Mon, 9 Mar 2009 14:22:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753153AbZCISWI (ORCPT ); Mon, 9 Mar 2009 14:22:08 -0400 Received: from gw1.cosmosbay.com ([212.99.114.194]:60982 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbZCISWH convert rfc822-to-8bit (ORCPT ); Mon, 9 Mar 2009 14:22:07 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by gw1.cosmosbay.com (8.13.7/8.13.7) with ESMTP id n29ILv4O005278; Mon, 9 Mar 2009 19:21:57 +0100 Message-ID: <49B55E45.3040902@cosmosbay.com> Date: Mon, 09 Mar 2009 19:21:57 +0100 From: Eric Dumazet User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Ron Yorgason CC: netdev@vger.kernel.org Subject: Re: Kernel Oops in UDP w/ ARM architecture References: <93d1fdd10903090852g268b4141h31dc39a5848fcf32@mail.gmail.com> <49B54F00.5090706@cosmosbay.com> <93d1fdd10903091046w2d426226sfcb2a0d52c94a114@mail.gmail.com> In-Reply-To: <93d1fdd10903091046w2d426226sfcb2a0d52c94a114@mail.gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [0.0.0.0]); Mon, 09 Mar 2009 19:21:57 +0100 (CET) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Please dont top post on this mailing list Ron Yorgason a écrit : > We're using the fec driver, found in drivers/net/fec.c. I modified > this driver slightly to get the MAC address from the redboot > configuration stored in flash memory, but it's otherwise untouched. I > can send my version of the file if that would help. > > --Ron > > Given that ARM seems to be picky about non aligned accesses, you might try this patch. This should force IP header to be aligned. --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u linux-2.6.19/drivers/net/fec.c.old linux-2.6.19/drivers/net/fec.c --- linux-2.6.19/drivers/net/fec.c.old +++ linux-2.6.19/drivers/net/fec.c @@ -641,13 +641,14 @@ * include that when passing upstream as it messes up * bridging applications. */ - skb = dev_alloc_skb(pkt_len-4); + skb = dev_alloc_skb((pkt_len - 4) + 2); if (skb == NULL) { printk("%s: Memory squeeze, dropping packet.\n", dev->name); fep->stats.rx_dropped++; } else { skb->dev = dev; + skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ skb_put(skb,pkt_len-4); /* Make room */ eth_copy_and_sum(skb, data, pkt_len-4, 0); skb->protocol=eth_type_trans(skb,dev);