From: Claudio Lanconelli <lanconelli.claudio@eptar.com>
To: netdev@vger.kernel.org
Cc: David Brownell <david-b@pacbell.net>
Subject: Re: [patch 2.6.24-git] net/enc28j60: oops fix
Date: Thu, 07 Feb 2008 11:24:17 +0100 [thread overview]
Message-ID: <47AADC51.8060401@eptar.com> (raw)
In-Reply-To: <20080206173342.21CDF8E152@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
David Brownell wrote:
> Prevent oops on enc28j60 packet RX: make sure buffers are aligned.
> Not all architectures support unaligned accesses in kernel space.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
Acked-by: Claudio Lanconelli <lanconelli.claudio@eptar.com>
> ---
> drivers/net/enc28j60.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/net/enc28j60.c 2008-02-06 09:29:00.000000000 -0800
> +++ b/drivers/net/enc28j60.c 2008-02-06 09:30:03.000000000 -0800
> @@ -900,7 +900,7 @@ static void enc28j60_hw_rx(struct net_de
> if (RSV_GETBIT(rxstat, RSV_LENCHECKERR))
> ndev->stats.rx_frame_errors++;
> } else {
> - skb = dev_alloc_skb(len);
> + skb = dev_alloc_skb(len + NET_IP_ALIGN);
> if (!skb) {
> if (netif_msg_rx_err(priv))
> dev_err(&ndev->dev,
> @@ -908,6 +908,7 @@ static void enc28j60_hw_rx(struct net_de
> ndev->stats.rx_dropped++;
> } else {
> skb->dev = ndev;
> + skb_reserve(skb, NET_IP_ALIGN);
> /* copy the packet from the receive buffer */
> enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv),
> len, skb_put(skb, len));
>
>
>
next prev parent reply other threads:[~2008-02-07 10:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 19:01 [patch 2.6.24-git] net/enc28j60: oops fix, low power mode David Brownell
2008-02-06 17:11 ` Claudio Lanconelli
2008-02-06 17:33 ` [patch 2.6.24-git] net/enc28j60: oops fix David Brownell
2008-02-07 10:24 ` Claudio Lanconelli [this message]
2008-02-19 20:52 ` [RESEND/patch 2.6.25-rc2-git] " David Brownell
2008-03-05 1:17 ` [RE(*2)SEND/patch " David Brownell
2008-03-06 2:52 ` David Miller
2008-03-06 3:05 ` David Brownell
2008-02-06 18:19 ` [patch 2.6.24-git] net/enc28j60: low power mode David Brownell
2008-02-07 10:49 ` Claudio Lanconelli
2008-02-07 5:56 ` [patch 2.6.24-git] net/enc28j60: oops fix, " David Brownell
2008-02-07 10:53 ` Claudio Lanconelli
2008-02-10 17:54 ` David Brownell
2008-02-11 12:07 ` Claudio Lanconelli
2008-02-11 20:23 ` David Brownell
2008-02-14 10:28 ` Claudio Lanconelli
2008-02-07 6:08 ` [patch 2.6.24-git] net/enc28j60: " David Brownell
2008-02-07 11:21 ` Claudio Lanconelli
2008-02-10 17:45 ` David Brownell
2008-02-10 17:46 ` David Brownell
2008-02-07 6:08 ` [patch 2.6.24-git] net/enc28j60: section fix David Brownell
2008-02-07 11:13 ` Claudio Lanconelli
2008-02-19 20:54 ` [RESEND/patch 2.6.25-rc2-git] net/enc28j60: low power mode David Brownell
2008-02-19 20:56 ` [RESEND/patch 2.6.25-rc2-git] net/enc28j60: section fix David Brownell
2008-04-19 2:08 ` [RESEND/patch 2.6.25] " David Brownell
2008-04-19 2:08 ` [RESEND/patch 2.6.25] net/enc28j60: low power mode David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47AADC51.8060401@eptar.com \
--to=lanconelli.claudio@eptar.com \
--cc=david-b@pacbell.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).