Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp708837pxj; Wed, 16 Jun 2021 11:42:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiNucc8HtbAdsDhvn/M7wQwNfplalRNC/CZg/FasRrFEwD9vSXhEITTHCgdcfFG89zVxgZ X-Received: by 2002:a17:907:270b:: with SMTP id w11mr957388ejk.7.1623868941966; Wed, 16 Jun 2021 11:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623868941; cv=none; d=google.com; s=arc-20160816; b=JQt1wSM5EvJggoa4iBVDzyEQ2lmEBdrNkSK5crxzT9YydzjRO0wZZ/l7KmvlHdOZiM ZGa+luXCpF9LnOtWjq6sBlzmXlb8jlslVxE6v57nH/j62YgNYKXUBJGHiB4+ZfU2Buah F4aZbB1EKVPbfOGiOPbZ39qSXWbZYuvwlQBLLhIzTD0HZOAO4wZvIezwlG5L0JQRkVal FoE/s9P25HKGqO4BqEhP7lvCfQTl1l6UhexcA78EdhbvgFhkjFc4fL9pyPS12HrnPmbT 6Ndx+GAW04xCAA3egOYkpHgJSvzs323ic1kYUsh7LRbKkqnt2QcNnW/1X6fQIpG2PvDw /tHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=wr3evAdCjQtOBqG7bWvgB68DiYXGxJ1XTZfxGH51J5I=; b=XiWKCLDd1XVzQSQFhtVX5uzxBBYX/8RFsfUzqdoQ3YXN4P+qFZ06QnAhB4kJA99ZKv kpjQdH6viPJXE9rvV+pctV+S1pkveq1EQIVAv6ZPPEqzXJRH6PHh7rD/Dn3hXWVDAf9a yaUMZd97sivqkNK5CUwJkc2wgqYk39i/e09ZVIIJCX9Rhg0qDNu4/75iPIANrm+RIS76 8AuK286VUpaTNRDs8wtMfyMa4f6hxHFEKjFTw+mBYuaIY3OOj0e0yJSuetpKQrjAop38 Mhl4D0U6dbE4oZVk0P9cRHk2MyxAlcuzKu0dagc7lHnu3KghC0mF4fB6ZM4uVQrAlz+5 xDPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=w97B3s49; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h93si3154152edd.605.2021.06.16.11.41.59; Wed, 16 Jun 2021 11:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=w97B3s49; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233136AbhFPNC1 (ORCPT + 99 others); Wed, 16 Jun 2021 09:02:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233127AbhFPNCT (ORCPT ); Wed, 16 Jun 2021 09:02:19 -0400 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A248C06175F for ; Wed, 16 Jun 2021 06:00:13 -0700 (PDT) Received: by mail-oo1-xc30.google.com with SMTP id 67-20020a4a01460000b0290245b81f6261so649370oor.6 for ; Wed, 16 Jun 2021 06:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wr3evAdCjQtOBqG7bWvgB68DiYXGxJ1XTZfxGH51J5I=; b=w97B3s49URV+ATkttjsdN0zOG8oOjVQPHIECkcvPIkev3cXQMKkqKDGceaUXg6TRlB ZNfFARexpheCQDAZDqTy3Uo+NfrnuOVVadFiL3AEaKutz5Vtofyfnx4sk/qK4R75gM/c Qjy4Aup6kIuOscF1OWhA+RxwSiWRHNJNTye6zPEG542g8FPGt5dVCtD0NCyXD+fy8Mav h9UdpknUijW50fkRtrnMqvB/ahko46bGyk6LvrkblyA2bQIMRjK+ll8HFYnjhqQ6dXBz SE+dl0O29hV9bXID+KBr6U23JKzLELSpqZxmq/FsSxclkVusX35GefQNpFSFXi7bAuu2 GihQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wr3evAdCjQtOBqG7bWvgB68DiYXGxJ1XTZfxGH51J5I=; b=FINqe5o4a3LV8Xz5DoE06jWTAII57DZVnSctrl1BkBz8XCbUjJ+67Zqcp0DVkKW4QI orUc8EezM1VSkz9a9kbb5KXI506v6wQdDzDDmCEgzQbgvbZeojs+5+8/wxLUVqqGHZmq UltvsYd9jhoE22+bRlEAWcCQVDdhF1x3hZhq7CRNH6Eiw1tgiUJq0C1szuUvUjIYUOQl QtGzAq7iXFVg10UePGdVPCtxFgMq6DW0eMpk5+HNBm9FgmWzTURZdkAK10EYUeCHi0FF Ycdif1vTL4XsiC/0LnQAoNfKzGBRDazK/xt9SamFA1yUwL8rQnfrNiDsrmPDxb536ryK bqrQ== X-Gm-Message-State: AOAM530CjZtTlHfVfNY6Clb5M2zAXhs6f8Fq0xw1o1Hugp/3o9dgtBqf hSwTTJRBb44XGP76xlA5obQdIJ0bfhNmnA== X-Received: by 2002:a4a:5182:: with SMTP id s124mr3984545ooa.34.1623848412425; Wed, 16 Jun 2021 06:00:12 -0700 (PDT) Received: from [192.168.1.134] ([198.8.77.61]) by smtp.gmail.com with ESMTPSA id p65sm459376oop.0.2021.06.16.06.00.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Jun 2021 06:00:12 -0700 (PDT) Subject: Re: kernel panic when scanning MTD partitions To: Corentin Labbe Cc: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: <1424d9da-5e11-3ba8-82ae-85f95f60ca9d@kernel.dk> From: Jens Axboe Message-ID: <00d45681-5dfc-3c93-5699-4652c71128dd@kernel.dk> Date: Wed, 16 Jun 2021 07:00:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 6:59 AM, Corentin Labbe wrote: > Le Wed, Jun 16, 2021 at 06:54:41AM -0600, Jens Axboe a écrit : >> On 6/16/21 6:24 AM, Corentin Labbe wrote: >>> Hello >>> >>> When scanning MTD partitions my kernel panic: >>> Searching for RedBoot partition table in 30000000.flash at offset 0xfe0000 >>> 7 RedBoot partitions found on MTD device 30000000.flash >>> Creating 7 MTD partitions on "30000000.flash": >>> 0x000000000000-0x000000020000 : "BOOT" >>> 8<--- cut here --- >>> Unable to handle kernel NULL pointer dereference at virtual address 00000034 >>> pgd = (ptrval) >>> [00000034] *pgd=00000000 >>> Internal error: Oops: 17 [#1] PREEMPT ARM >>> Modules linked in: >>> CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc6-next-20210615+ #101 >>> Hardware name: Gemini (Device Tree) >>> PC is at _set_bit+0x20/0x4c >>> LR is at blk_queue_write_cache+0x20/0x5c >>> pc : [] lr : [] psr: 60000093 >>> sp : c1439ca0 ip : 60000013 fp : c4058c00 >>> r10: 00000000 r9 : c4058ab8 r8 : c1c553b8 >>> r7 : c3f71080 r6 : 00000000 r5 : 00000000 r4 : 00000000 >>> r3 : 00020000 r2 : 00000011 r1 : 00000034 r0 : 00000000 >>> Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none >>> Control: 0000397f Table: 02338000 DAC: 00000053 >>> Register r0 information: NULL pointer >>> Register r1 information: non-paged memory >>> Register r2 information: non-paged memory >>> Register r3 information: non-paged memory >>> Register r4 information: NULL pointer >>> Register r5 information: NULL pointer >>> Register r6 information: NULL pointer >>> Register r7 information: slab kmalloc-128 start c3f71080 pointer offset 0 size 128 >>> Register r8 information: slab dentry start c1c553b8 pointer offset 0 size 40 >>> Register r9 information: slab kmalloc-1k start c4058800 pointer offset 696 size 1024 >>> Register r10 information: NULL pointer >>> Register r11 information: slab kmalloc-1k start c4058c00 pointer offset 0 size 1024 >>> Register r12 information: non-paged memory >>> Process swapper (pid: 1, stack limit = 0x(ptrval)) >>> Stack: (0xc1439ca0 to 0xc143a000) >>> 9ca0: c231a480 c07ab67c 00000000 c03cd1b8 00000000 c00f4b18 c07ab67c c231a480 >>> 9cc0: c4058c00 c07ab67c 05a00000 c03ce474 c07ab67c c4058c00 c07ab658 c03ccf88 >>> 9ce0: c4058c00 c07ab660 c07ab434 c03c7328 c068ab50 00000000 c4058cf8 c40912c0 >>> 9d00: ffffffff 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>> 9d20: 00000101 00000000 00000001 c03c6ba8 00000000 00020000 00000001 00000001 >>> 9d40: c4058c00 00000000 00000000 4af56ea3 00000000 c4058800 c4058800 c406f000 >>> 9d60: 00000007 c03ca0fc 00000000 00000000 00000007 c07ab638 c05c6c84 00000000 >>> 9d80: 00000007 c4058800 c1438000 00000000 00000000 c03c9f90 00000001 c05c6c88 >>> 9da0: 00000000 00000000 c406f000 00000007 c07ab638 4af56ea3 00002201 c4058800 >>> 9dc0: c05c6c84 00000000 00000000 c221c2a0 c2215810 00000000 00000000 c03c7694 >>> 9de0: 00000001 c4009c20 c4008500 c2215800 c221c2a0 c03dc4a0 00000000 c0196864 >>> 9e00: 00000000 c4008500 c4052b58 00000000 00000002 4af56ea3 00000000 00000000 >>> 9e20: c2215810 c07ab928 00000000 c07ab928 00000000 c07bb000 c06f73e0 c037b898 >>> 9e40: c2215810 c0815554 00000000 00000000 c07ab928 c03796fc c2215810 c07ab928 >>> 9e60: c2215854 c07ab928 c071c830 c06d408c c07bb000 c0379b4c c2215810 00000000 >>> 9e80: c2215854 c037a0ec 00000000 c07ab928 c2215810 c07a9fb0 c071c830 c037a17c >>> 9ea0: 00000000 c07ab928 c037a0f4 c0377584 c143e11c c143e10c c140c530 4af56ea3 >>> 9ec0: c07ab928 c4008480 00000000 c0378a68 c068d2f4 c068d2f4 c06f73e0 c07ab928 >>> 9ee0: 00000000 00000000 c07bb000 c037a818 c07117f8 ffffe000 00000000 c00097ac >>> 9f00: c1403b00 c1403b08 c1403aff c0035200 00000000 c0694bc0 0000009f 00000000 >>> 9f20: 00000000 c06f73e0 00000006 00000006 00000000 c1403b16 c1403b1d 4af56ea3 >>> 9f40: 00000000 00000006 0000009f 4af56ea3 c071c84c c0724380 00000007 c1403b00 >>> 9f60: c071c850 c06f8108 00000006 00000006 00000000 c06f73e0 00000000 0000009f >>> 9f80: c0558560 00000000 c0558560 00000000 00000000 00000000 00000000 00000000 >>> 9fa0: 00000000 c0558570 00000000 c0008348 00000000 00000000 00000000 00000000 >>> 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>> 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 >>> [] (_set_bit) from [] (blk_queue_write_cache+0x20/0x5c) >>> [] (blk_queue_write_cache) from [] (add_mtd_blktrans_dev+0x218/0x3cc) >>> [] (add_mtd_blktrans_dev) from [] (mtdblock_add_mtd+0x60/0x78) >>> [] (mtdblock_add_mtd) from [] (blktrans_notify_add+0x3c/0x54) >>> [] (blktrans_notify_add) from [] (add_mtd_device+0x3bc/0x5e8) >>> [] (add_mtd_device) from [] (add_mtd_partitions+0xc4/0x16c) >>> [] (add_mtd_partitions) from [] (parse_mtd_partitions+0x370/0x418) >>> [] (parse_mtd_partitions) from [] (mtd_device_parse_register+0x74/0x2c4) >>> [] (mtd_device_parse_register) from [] (physmap_flash_probe+0x5e8/0x808) >>> [] (physmap_flash_probe) from [] (platform_probe+0x5c/0xbc) >>> [] (platform_probe) from [] (really_probe+0xf8/0x4e8) >>> [] (really_probe) from [] (driver_probe_device+0x60/0xb8) >>> [] (driver_probe_device) from [] (device_driver_attach+0xa8/0xb0) >>> [] (device_driver_attach) from [] (__driver_attach+0x88/0x11c) >>> [] (__driver_attach) from [] (bus_for_each_dev+0x78/0xc4) >>> [] (bus_for_each_dev) from [] (bus_add_driver+0xe8/0x1d0) >>> [] (bus_add_driver) from [] (driver_register+0x88/0x118) >>> [] (driver_register) from [] (do_one_initcall+0x50/0x1e0) >>> [] (do_one_initcall) from [] (kernel_init_freeable+0x178/0x200) >>> [] (kernel_init_freeable) from [] (kernel_init+0x10/0x100) >>> [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) >>> Exception stack(0xc1439fb0 to 0xc1439ff8) >>> 9fa0: 00000000 00000000 00000000 00000000 >>> 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>> 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >>> Code: e3a03001 e1a03213 e10fc000 e321f093 (e7912100) >>> ---[ end trace f3b2f52ba3b0d435 ]--- >>> Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b >>> ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- >>> >>> This happen on 5.13.0-rc6-next-20210615+ on my ARM Gemini ssi1328. >> >> Should be fixed once for-next updates the block branch. >> > > Thanks, do you have a link to the fix ? or patch name. Yep, this one: https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.14/block&id=07a719f8fdbe4ae0f825fa1a6d2755a63deb265e -- Jens Axboe