From: Lukas Hejtmanek Subject: Re: Question regarding SLAB corruption Date: Mon, 9 Jul 2007 19:42:26 +0200 Message-ID: <20070709174226.GQ3885@ics.muni.cz> References: <20070709171103.GO3885@ics.muni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Roland Dreier , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Jul 09, 2007 at 06:21:24PM +0100, Keir Fraser wrote: > By my understanding, the infiniband driver is doing an order-6 allocati= on, > then stuffing that multi-page region into a single element of a scatter= list. > It is then calling dma_map_sg(), which [on Xen] calls swiotlb_map_sg(), > which calls map_single() on that multi-page extent. Am I misunderstandi= ng > something? Not exactly. IB driver does alloc_pages (order-6). Then it calls pci_map_sg() which is basically dma_map_sg(). This one invokes swiotlb_map_sg() which possibly = calls map_single() (right now I'm not sure, I must check it, but if yes, it cre= ates index 3328). Then later, IB driver invokes dma_sync_single on the first page from that order-6 allocation via dma_handle. And in __sync_single it crashes becaus= e sync_single picks up index 3332 instead of 3328. Btw, please, keep Roland in Cc. --=20 Luk=E1=B9 Hejtm=E1nek