Received: by 10.223.185.116 with SMTP id b49csp6625191wrg; Thu, 8 Mar 2018 10:23:56 -0800 (PST) X-Google-Smtp-Source: AG47ELs5bSmYQo1lD4XOQLdVEdF9nRXx8zUFtQBtLoNq63f3YqQzh9zB1TRBLXM8yxTJD7+wqd1y X-Received: by 10.98.36.25 with SMTP id r25mr27489596pfj.106.1520533436385; Thu, 08 Mar 2018 10:23:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520533436; cv=none; d=google.com; s=arc-20160816; b=dmAEsRh6ighUsGVEaG3w4Z0JvZeKdLrCVRNHGeASTUbE0m5sGqWViDU5fUm4lwD+IQ is+rZDJFChiitIX6vj69ybFbGmQILfgPJCxWQhUL0Z29BchY7GWSTJP/SNi/SRPJDcPA ZIATaHVR2KYB0Or5xD1IoeDuRnKuMG6EXUOlfCjlnJmwpCtVTgtjbmiT84NKeAhctGDi KLkz4gf2KJjCx+2h4XOqvSbg+OjS/gdeiMA3IcmI8+/6B337/h82kAVH0Gi5YuaJELRk VvBkVH18EytgvF2ZjD9otpCOLQdqkMyU8HDR5JEIDeB53eFCWEZvs1hfKT/BxnP5xGvh 1nZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=BFRGIyEQ60vSyiDy9QDDhmORuSglOzF9yfm+UnrknAE=; b=swuS4332QXbsPwLa70NONN/PjNcswW6WjBJzvbYOb1maLoKUhL3kz2OMt/Y1kjXtG0 RXeFFL/g1H90MDrijVTgZLIZmuqSQwyxq4mKOCoso9GQryUu69bfrWMQ1+3s3HiOS6fa Y4THQ/01NT3KVMAOgrgOyd4YWB4SyzddacE4PggUj9qPDvkmz3AKcnMld2S10OwCnM9M IrlCDcdiq2ETwLtfdMQXRkmPIlWB6auynkAGjwzeovpMZgN66nlpGCm4D8EiVZ2SyzkH ueTWxQ7pu+gt2nFkqNesys535YddxOv5F/twTDu4zbZYALZwC4PU5Pu09gnBRsStAo2b qMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Vamf5htz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si13323108pla.754.2018.03.08.10.23.41; Thu, 08 Mar 2018 10:23:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Vamf5htz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756124AbeCHSWa (ORCPT + 99 others); Thu, 8 Mar 2018 13:22:30 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:14156 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755868AbeCHSW2 (ORCPT ); Thu, 8 Mar 2018 13:22:28 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w28ILXwf028454; Thu, 8 Mar 2018 12:21:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520533293; bh=lUvXD5bWAKEFTCTbNQ3l1l4XaNE83bdrqjHb+aTd+BE=; h=From:Subject:To:CC:References:Date:In-Reply-To; b=Vamf5htzo7hO7VFpfsPmPyqdbeilPRtoZN4DxQInHuIAu96n636Od4CmoKfvajOWa S1RO/uSkINfERBnQO9SPGyy82TMJX3XAuHlSM9/izTR4NOaaAoQZCBVOq0zv27jJ7Q Xw9IU0OYvugr9f9eOOVwnGSr58sEGnK4dzR6yTdg= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w28ILXel016672; Thu, 8 Mar 2018 12:21:33 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 8 Mar 2018 12:21:33 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 8 Mar 2018 12:21:32 -0600 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w28ILWPT025336; Thu, 8 Mar 2018 12:21:32 -0600 From: Suman Anna Subject: Re: Nokia N900: refcount_t underflow, use after free To: Tony Lindgren , Pavel Machek CC: , , kernel list , linux-arm-kernel , , , , , , , , , , , =?UTF-8?Q?Filip_Matijevi=c4=87?= References: <20180308143053.GA17267@amd> <20180308165903.GM5799@atomide.com> Message-ID: <57c9f17b-fc9d-8506-4b5d-70ac216c9248@ti.com> Date: Thu, 8 Mar 2018 12:21:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308165903.GM5799@atomide.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, On 03/08/2018 10:59 AM, Tony Lindgren wrote: > * Pavel Machek [180308 14:31]: >> Hi! >> >> I'm getting this warning... Has anyone seen/debugged that before? >> Unfortunately the backtrace does not seem to be too useful :-(. > > Adding Suman to Cc, as it points to arm_iommu_release_mapping(). Hmm, we need to find out if the failure paths in isp_probe() are mismatched, or if this is coming from some mismatch between the OMAP IOMMU driver and the DMA plumbing. AFAIK, the cleanup paths in this driver hasn't changed in sometime. Do you see this on mainline branch or just the next branch? Also, can you check where you are failing in the isp_probe and if the warning is seen before or after the function returns. I don't have any OMAP3 board nor any ISP-enabled device to check this behavior. regards Suman > > Regards, > > Tony > >> [ 0.000000] Booting Linux on physical CPU 0x0 >> [ 0.000000] Linux version 4.16.0-rc3-next-20180302 (pavel@duo) (gcc >> version 4.7.2 (GC >> C)) #70 Fri Mar 2 10:16:00 CET 2018 >> [ 0.000000] CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), >> cr=10c5387d >> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT >> nonaliasing instruction cac >> ... >> [ 1.244140] omap3isp 480bc000.isp: 480bc000.isp supply vdd-csiphy2 >> not found, using d >> ummy regulator >> [ 1.254089] omap3isp 480bc000.isp: Revision 2.0 found >> [ 1.260009] omap-iommu 480bd400.mmu: 480bd400.mmu: version 1.1 >> [ 1.266693] ------------[ cut here ]------------ >> [ 1.271606] WARNING: CPU: 0 PID: 1 at lib/refcount.c:187 >> refcount_sub_and_test+0x94/0xa8 >> [ 1.280181] refcount_t: underflow; use-after-free. >> [ 1.285247] Modules linked in: >> [ 1.288482] CPU: 0 PID: 1 Comm: swapper Not tainted >> 4.16.0-rc3-next-20180302 #70 >> [ 1.296295] Hardware name: Nokia RX-51 board >> [ 1.300811] [] (unwind_backtrace) from [] >> (show_stack+0x10/0x14) >> [ 1.309020] [] (show_stack) from [] >> (__warn+0xe8/0x110) >> [ 1.316375] [] (__warn) from [] >> (warn_slowpath_fmt+0x38/0x48) >> [ 1.324310] [] (warn_slowpath_fmt) from [] >> (refcount_sub_and_test+0x94/0xa8) >> [ 1.333557] [] (refcount_sub_and_test) from [] >> (arm_iommu_release_mapping+0x18/0x2c) >> [ 1.343597] [] (arm_iommu_release_mapping) from >> [] (driver_probe_device+0x24c/0x314) >> [ 1.353637] [] (driver_probe_device) from [] >> (__driver_attach+0xac/0xb0) >> [ 1.362548] [] (__driver_attach) from [] >> (bus_for_each_dev+0x58/0x7c) >> [ 1.371185] [] (bus_for_each_dev) from [] >> (bus_add_driver+0xe0/0x1f0) >> [ 1.379852] [] (bus_add_driver) from [] >> (driver_register+0x78/0xf4) >> [ 1.388305] [] (driver_register) from [] >> (do_one_initcall+0x3c/0x16c) >> [ 1.396972] [] (do_one_initcall) from [] >> (kernel_init_freeable+0xf8/0x1c4) >> [ 1.406066] [] (kernel_init_freeable) from [] >> (kernel_init+0x8/0x108) >> [ 1.414703] [] (kernel_init) from [] >> (ret_from_fork+0x14/0x2c) >> [ 1.422698] Exception stack(0xce049fb0 to 0xce049ff8) >> [ 1.428039] 9fa0: 00000000 >> 00000000 00000000 00000000 >> [ 1.436676] 9fc0: 00000000 00000000 00000000 00000000 00000000 >> 00000000 00000000 00000000 >> [ 1.445312] 9fe0: 00000000 00000000 00000000 00000000 00000013 >> 00000000 >> [ 1.452270] ---[ end trace dcb3a72772bbfe7a ]--- >> [ 1.459045] ti-soc-thermal 48002524.bandgap: This OMAP thermal >> sensor is unreliable. You've been warned >> [ 1.469055] ti-soc-thermal 48002524.bandgap: Non-trimmed BGAP, Temp >> not accurate >> [ 1.476898] ti-soc-thermal 48002524.bandgap: thermal zone device is >> NULL >> [ 1.485198] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout >> 60 sec >> [ 1.495208] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd >> >> -- >> (english) http://www.livejournal.com/~pavelmachek >> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html > >