Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760298AbZFMRIT (ORCPT ); Sat, 13 Jun 2009 13:08:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755401AbZFMRID (ORCPT ); Sat, 13 Jun 2009 13:08:03 -0400 Received: from mail-bw0-f213.google.com ([209.85.218.213]:56121 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755262AbZFMRIA (ORCPT ); Sat, 13 Jun 2009 13:08:00 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=e9pnYgRmp5JVcdkFID/H2g3m6r9QfFbv7JazTTOYGlIqaA0VfQdqJJknp9cZg/vrEo b1uIMQNJ1euFYeWQpC7Lx2ca5IZTawpOfxjYpQrft2nyVq9V5uBbzWDW3rDJJcS+/lSx grWdJS7IiAQp0Q6jQghtLEGibbBo0E5g87xbk= MIME-Version: 1.0 In-Reply-To: <20090612141346.GY5139@amd.com> References: <20090605173232N.fujita.tomonori@lab.ntt.co.jp> <20090605104132.GE24836@amd.com> <64bb37e0906101341j341f5179o9abfa888a6b96fc3@mail.gmail.com> <20090611081032.GN5139@amd.com> <64bb37e0906111038h1a5b9f17oec6c6368d2fbd36d@mail.gmail.com> <20090612141346.GY5139@amd.com> Date: Sat, 13 Jun 2009 19:08:01 +0200 Message-ID: <64bb37e0906131008x59b25b94u501fc2192cc28be0@mail.gmail.com> Subject: Re: [PATCH] dma-debug: disable DMA_API_DEBUG for now From: Torsten Kaiser To: Joerg Roedel Cc: FUJITA Tomonori , Linus Torvalds , mingo@elte.hu, lethal@linux-sh.org, hancockrwd@gmail.com, jens.axboe@oracle.com, bharrosh@panasas.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5250 Lines: 114 On Fri, Jun 12, 2009 at 4:13 PM, Joerg Roedel wrote: > On Thu, Jun 11, 2009 at 07:38:47PM +0200, Torsten Kaiser wrote: >> DMA-API: device driver tries to free DM >> A memory it has not allocated [device address=0x000000011e4c3000] >> [size=4096 bytes] > > Hmm, looking again over the code I've seen that the ref > dma_debug_entries are not alway filled with all necessary information > for best-fit. Can you please try if you still get false warnings when > you apply the two patches attached instead of the one I sent yesterday? I tested these patches (0001-dma-debug-check-for-sg_call_ents-in-best-fit-algorit.patch and 0002-dma-debug-be-more-careful-when-building-reference-en.patch) against 2.6.30-git6 and did not see any warnings. I can't be 100% sure about the fix, because I do not have a reliable trigger, but it looks quite good. Torsten Just for reference, with an unpatched 2.6.30-git6 the warning was still there: Jun 13 16:54:56 treogen [ 168.201493] ------------[ cut here ]------------ Jun 13 16:54:56 treogen [ 168.201512] WARNING: at lib/dma-debug.c:827 check_unmap+0x593/0x670() Jun 13 16:54:56 treogen [ 168.201517] Hardware name: KFN5-D SLI Jun 13 16:54:56 treogen [ 168.201522] sata_sil24 0000:04:00.0: DMA-API: device driver frees DMA sg lis t with different entry count [map count=1] [unmap count=2] Jun 13 16:54:56 treogen [ 168.201526] Modules linked in: msp3400 tuner tea5767 tda8290 tuner_xc2028 xc 5000 tda9887 tuner_simple tuner_types mt20xx tea5761 bttv ir_common v4l2_common videodev v4l1_compat v4 l2_compat_ioctl32 videobuf_dma_sg videobuf_core pata_amd btcx_risc tveeprom sg Jun 13 16:54:56 treogen [ 168.201562] Pid: 0, comm: swapper Not tainted 2.6.30-git6 #1 Jun 13 16:54:56 treogen [ 168.201566] Call Trace: Jun 13 16:54:56 treogen [ 168.201569] [] ? check_unmap+0x593/0x670 Jun 13 16:54:56 treogen [ 168.201585] [] warn_slowpath_common+0x78/0xd0 Jun 13 16:54:56 treogen [ 168.201591] [] warn_slowpath_fmt+0x64/0x70 Jun 13 16:54:56 treogen [ 168.201599] [] ? __slab_free+0x185/0x340 Jun 13 16:54:56 treogen [ 168.201606] [] check_unmap+0x593/0x670 Jun 13 16:54:56 treogen [ 168.201615] [] ? bio_free+0x4d/0x60 Jun 13 16:54:56 treogen [ 168.201622] [] ? bio_fs_destructor+0x10/0x20 Jun 13 16:54:56 treogen [ 168.201628] [] debug_dma_unmap_sg+0xfe/0x140 Jun 13 16:54:56 treogen [ 168.201636] [] ? put_device+0x12/0x20 Jun 13 16:54:56 treogen [ 168.201645] [] ata_sg_clean+0x78/0xf0 Jun 13 16:54:56 treogen [ 168.201651] [] __ata_qc_complete+0x35/0x110 Jun 13 16:54:56 treogen [ 168.201658] [] ata_qc_complete+0xbd/0x250 Jun 13 16:54:56 treogen [ 168.201665] [] ata_qc_complete_multiple+0x9c/0xf0 Jun 13 16:54:56 treogen [ 168.201674] [] sil24_interrupt+0xb9/0x5b0 Jun 13 16:54:56 treogen [ 168.201681] [] ? getnstimeofday+0x5c/0xf0 Jun 13 16:54:56 treogen [ 168.201688] [] ? ktime_get_ts+0x59/0x60 Jun 13 16:54:56 treogen [ 168.201696] [] handle_IRQ_event+0x68/0x160 Jun 13 16:54:56 treogen [ 168.201703] [] handle_fasteoi_irq+0x6d/0xe0 Jun 13 16:54:56 treogen [ 168.201710] [] handle_irq+0x1f/0x30 Jun 13 16:54:56 treogen [ 168.201715] [] do_IRQ+0x6a/0xe0 Jun 13 16:54:56 treogen [ 168.201722] [] ret_from_intr+0x0/0xa Jun 13 16:54:56 treogen [ 168.201725] [] ? default_idle+0x6a/0xd0 Jun 13 16:54:56 treogen [ 168.201738] [] ? notifier_call_chain+0x3f/0x80 Jun 13 16:54:56 treogen [ 168.201744] [] ? c1e_idle+0x38/0x100 Jun 13 16:54:56 treogen [ 168.201751] [] ? atomic_notifier_call_chain+0x15/0x20 Jun 13 16:54:56 treogen [ 168.201757] [] ? cpu_idle+0x62/0xb0 Jun 13 16:54:56 treogen [ 168.201766] [] ? rest_init+0x6d/0x80 Jun 13 16:54:56 treogen [ 168.201774] [] ? start_kernel+0x342/0x405 Jun 13 16:54:56 treogen [ 168.201781] [] ? x86_64_start_reservations+0x99/0xb9 Jun 13 16:54:56 treogen [ 168.201787] [] ? x86_64_start_kernel+0xe0/0xf2 Jun 13 16:54:56 treogen [ 168.201792] ---[ end trace 7ab4a9443c6c6e69 ]--- Jun 13 16:54:56 treogen [ 168.201795] Mapped at: Jun 13 16:54:56 treogen [ 168.201797] [] debug_dma_map_sg+0x159/0x180 Jun 13 16:54:56 treogen [ 168.201805] [] ata_qc_issue+0x19c/0x300 Jun 13 16:54:56 treogen [ 168.201812] [] ata_scsi_translate+0xa8/0x180 Jun 13 16:54:56 treogen [ 168.201818] [] ata_scsi_queuecmd+0xb1/0x2d0 Jun 13 16:54:56 treogen [ 168.201823] [] scsi_dispatch_cmd+0xe3/0x220 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/