All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 3.2] iwlagn: fix (remove) use of PAGE_SIZE
Date: Wed, 21 Dec 2011 11:19:54 -0500	[thread overview]
Message-ID: <20111221161953.GB11842@tuxdriver.com> (raw)
In-Reply-To: <1324332059-11630-1-git-send-email-wey-yi.w.guy@intel.com>

On Mon, Dec 19, 2011 at 02:00:59PM -0800, Wey-Yi Guy wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> The ICT code erroneously uses PAGE_SIZE. The bug
> is that PAGE_SIZE isn't necessarily 4096, so on
> such platforms this code will not work correctly
> as we'll try to attempt to read an index in the
> table that the device never wrote, it always has
> 4096-byte pages.
> 
> Additionally, the manual alignment code here is
> unnecessary -- Documentation/DMA-API-HOWTO.txt
> states:
>   The cpu return address and the DMA bus master address are both
>   guaranteed to be aligned to the smallest PAGE_SIZE order which
>   is greater than or equal to the requested size.  This invariant
>   exists (for example) to guarantee that if you allocate a chunk
>   which is smaller than or equal to 64 kilobytes, the extent of the
>   buffer you receive will not cross a 64K boundary.
> 
> Just use appropriate new constants and get rid of
> the alignment code.
> 
> Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>

This seems like a big patch.  It is a bit late in the release cycle
to rewrite all the DMA allocation code. :-)

What platforms does this affect?  Are there actual users involved?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2011-12-21 16:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 22:00 [PATCH 3.2] iwlagn: fix (remove) use of PAGE_SIZE Wey-Yi Guy
2011-12-21 16:19 ` John W. Linville [this message]
2011-12-21 15:45   ` Guy, Wey-Yi
2011-12-21 19:58     ` John W. Linville
2011-12-22  1:20       ` wwguy
2011-12-22  6:06         ` Emmanuel Grumbach
2011-12-22 16:19           ` Berg, Johannes

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=20111221161953.GB11842@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wey-yi.w.guy@intel.com \
    /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.