[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1421028743.19708.44.camel@decadent.org.uk>
Date: Mon, 12 Jan 2015 02:12:23 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Larry Finger <Larry.Finger@...inger.net>
Cc: Eric Biggers <ebiggers3@...il.com>, kvalo@...eaurora.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Stable <stable@...r.kernel.org>
Subject: Re: [PATCH V3 for 3.19] rtlwifi: Fix error when accessing unmapped
memory in skb
On Wed, 2014-12-31 at 15:10 -0600, Larry Finger wrote:
> On 12/30/2014 11:07 PM, Eric Biggers wrote:
> > On Tue, Dec 30, 2014 at 09:33:07PM -0600, Larry Finger wrote:
> >> v3 - Unmap skb before trying to allocate a new one so as to not leak mapping.
> >
> > Looks good to me, although I'm not sure about the handling of DMA mapping errors
> > (perhaps that's something that drivers typically don't even try to handle?).
> > Anyway, the skb allocation issue appears to be resolved now. I am running your
> > patch with an extra hack to inject some occasional skb allocation failures, and
> > I haven't noticed any problems except dropped packets.
>
> The last time I saw any DMA mapping errors were for some early BCM43xx cards
> that only had 20 bits of DMA addressing space. These Realtek devices have a full
> 32 bits of addressing, thus any physical address in the first 4GB of RAM will be
> OK. I suppose that it might be possible to get a physical address outside this
> range for machines with a lot of RAM, but they are unlikely to have wifi interfaces.
[...]
Really, you don't think laptops and desktops come with 4GB RAM or more?
Besides that, DMA mapping may involve calling an IOMMU driver that may
fail for some reason.
Drivers need to check for DMA mapping errors, it is not optional.
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists