All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: chris2553@googlemail.com, linux-wireless@vger.kernel.org
Subject: Re: Warning emited by 2.6.24-rc6-git5
Date: Sat, 29 Dec 2007 11:21:30 +0100	[thread overview]
Message-ID: <200712291121.31120.IvDoorn@gmail.com> (raw)
In-Reply-To: <1198922056.4172.25.camel@johannes.berg>

On Saturday 29 December 2007, Johannes Berg wrote:
> I didn't think that many drivers had this problem... The warning is
> harmless on machines that are ok with unaligned memory accesses.
> 
> > WARNING: at net/mac80211/rx.c:1486 __ieee80211_rx()
> > Pid: 0, comm: swapper Not tainted 2.6.24-rc6-git5 #11
> 
> comes from
>         /*
>          * Drivers are required to align the payload data to a four-byte
>          * boundary, so the last two bits of the address where it starts
>          * may not be set. The header is required to be directly before
>          * the payload data, padding like atheros hardware adds which is
>          * inbetween the 802.11 header and the payload is not supported,
>          * the driver is required to move the 802.11 header further back
>          * in that case.
>          */
>         hdrlen = ieee80211_get_hdrlen(rx.fc);
>         WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3);
> 
> 
> Although I'm starting to doubt my own sanity here with this sanity check
> if so many drivers can trigger it.

If it helps as reference, rt2x00 allocates and initializes the data as follows:

		skb_reserve(skb, NET_IP_ALIGN);
		skb_put(skb, desc.size); /* Always a multiple of 4 bytes */
		memcpy(skb->data, entry->data_addr, desc.size);

Should there have done more for the aligning of the data?

Ivo

  reply	other threads:[~2007-12-29 10:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-29  9:42 Warning emited by 2.6.24-rc6-git5 Chris Clayton
2007-12-29  9:54 ` Johannes Berg
2007-12-29 10:21   ` Ivo van Doorn [this message]
2007-12-29 10:26     ` Johannes Berg
2007-12-29 10:36     ` Johannes Berg
2007-12-29 11:47       ` Ivo van Doorn
2007-12-29 11:59         ` Johannes Berg
2007-12-29 12:01           ` Johannes Berg
2007-12-29 14:29           ` Ivo van Doorn
2007-12-29 14:40             ` Johannes Berg
2007-12-29 15:14               ` Ivo van Doorn
2007-12-30 11:49                 ` Chris Clayton
2007-12-30 12:11                   ` Ivo van Doorn
2007-12-30 19:26                     ` Chris Clayton
2007-12-30 22:01                       ` Ivo van Doorn
2007-12-31  7:27                     ` Kalle Valo
2007-12-31  7:56                       ` Ivo Van Doorn
2008-01-02  6:32                         ` Chris Clayton
2008-01-02 19:02                           ` Ivo van Doorn
2008-01-04 17:09                             ` Chris Clayton
2008-01-06  7:49                               ` Andrew Price
2008-01-08  6:03                               ` Chris Clayton
2008-01-02  8:11                 ` Johannes Berg
2008-01-02 19:12                   ` Ivo van Doorn
2008-01-08 15:44                     ` Tomas Winkler
2008-01-08 17:09                       ` Johannes Berg
2008-01-08 17:22                         ` Johannes Berg
2008-01-08 19:43                           ` Tomas Winkler
2008-01-08 20:02                             ` Michael Buesch
2008-01-08 23:18                               ` Tomas Winkler
2008-01-09 12:49                             ` Johannes Berg

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=200712291121.31120.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=chris2553@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.