Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2053994pxb; Mon, 22 Feb 2021 19:15:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUf8PtAlIFuLNVd7iuEut/XKKjt8NCYg6DRO+ZFxxNDXBHt/jT6TqO79E2eLPgw3ToFbtX X-Received: by 2002:a17:906:2803:: with SMTP id r3mr23725368ejc.50.1614050131827; Mon, 22 Feb 2021 19:15:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614050131; cv=none; d=google.com; s=arc-20160816; b=qvf3tj5Md9eHMTgc+U7lIf4zc4cus7laKFKh3swEO/o8hkr7M4TuwWkWxAxuIgAA4a GKt8MQ4Rbz621E3d1zvQJZdI+ygRBehMMHMIBlxf/zonafP7tQwqlyqetIO+qvIkJqf4 PN7ShFZVlCt2jnha9DX+lw22KrPnlHI8CoMh/QIqtuTK9EWfXmQZ+e6QlRV8c72YTpzJ Yw/u0BFngZhkYOcFHNirJsa8nxQmaB0/GG3thXu0N9P36XGxEk6ljIIPPD1tQHBhtDOe 1QGlHBivH+sj7tZcTzGVXRKdrfDk69eD0H7qjmIhy3DIS4i6dG8g5d3n4U2HxG+NJ42H NG1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=3N9kYcLkqfFG5m6tp7UOFAPCxZxPf7JdbEB+PPgAJAM=; b=iZeFbw6QsqW+R/Wv7aH1aEOjN0uKs6OWuXYN1GPom2EWH9mDI1dM/CAT7HBwrhKEa/ u1Ma8+SCfPb9cS7AyoVXxBpVYpLqn8rmwvNp9Mhtrib2nRUVQaFbPReWZR1jSZEh5i3N p56W/nYzRAZKC4jA7uoxELRAgqMvJDkHFn8ulGs7CZRZ2h6mGmWVL99dfoKc/F7zNm9A 4FlSeTtAij1Z3Anp/Va3QcdJU4w0Xgn753dsP3bZuPloLQGoqiP4FTWq3okdZ7lhUr4Q vHgGfYoIf4ePbMNuRjL72JezD4egiQf5ibsnrbGAj7kYY2NXKCeiVEs3tQFaZyQESmiD vfHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EdbrEwmy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si13179048ejx.409.2021.02.22.19.15.06; Mon, 22 Feb 2021 19:15:31 -0800 (PST) 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=@linaro.org header.s=google header.b=EdbrEwmy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbhBWDHO (ORCPT + 99 others); Mon, 22 Feb 2021 22:07:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbhBWDHN (ORCPT ); Mon, 22 Feb 2021 22:07:13 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D30C06174A for ; Mon, 22 Feb 2021 19:06:32 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id v30so9052213lfq.6 for ; Mon, 22 Feb 2021 19:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=3N9kYcLkqfFG5m6tp7UOFAPCxZxPf7JdbEB+PPgAJAM=; b=EdbrEwmyBqbrJgBShwPaBQilzQWWJ373gpmnVz7Ag68vo+t6ZFjFf1ksZh6KUtsVQw rrpupv4xvfgmgK4bUBcHEoyTtiq3semakajriwtgXEUj+f8srO/27P9O/9L6YhqwskjW uqsKTp5QVa9ZV8UH476RLOZtKDWQsD1tVRY4LOZ5lhT8Ys9lbNO7ESQMDzTeiT5bEOdk RUgqRAU8VmLpEXfWcRULspqIcF7c/mdQY/Op2DLLsBzayglDis/tv2vR4hP6p/F8Ogba DIwgHytu4vf1X/bP6MRIXAuKrnJkXnSq3yUZJu0wj78nMQ2PdIjdiHhiHQ9fFItZjdYL E8+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=3N9kYcLkqfFG5m6tp7UOFAPCxZxPf7JdbEB+PPgAJAM=; b=bsYgc9kJH62TxO5n9BPnM88uGgfooz3NXuBtU8bFkNNwXDl0K19lqyPrDf8nBTvb7z tTNk0cHBWjvVpync88Y+bvucmOl/HMjbx+ZhrskO9WBXReFhRvTUmV3nYtkk6ymuokxL 3dLsTJaY0Nuqp2Ibzxyyyyir8UX0R8ZQ10kyb4D5D2KuZH5jZNJEnby5IqGyqUcJHEOW YUNDTqJCdoh23hLH8Hs0ePXkdfooqtiFQBkBWMnUvver2bsJG3AhVrJoG54qgGL8r+QN HL/SiBnHG9n385z38d0drjE4qgATdR2KDTQsDLtn31O9UXqDxR0rDK9j0xED4V/7pU7s lDNw== X-Gm-Message-State: AOAM5304dGd6FdnkafYgWtBfp84Wu/UqTbwaVMHhaM7rDiDuS4DQaoAv 1Gdf/lZaDBO4fAARV8Amk2DGH7S6VkeJVlCaja1R8w== X-Received: by 2002:a19:9c5:: with SMTP id 188mr14569247lfj.626.1614049591234; Mon, 22 Feb 2021 19:06:31 -0800 (PST) MIME-Version: 1.0 From: John Stultz Date: Mon, 22 Feb 2021 19:06:18 -0800 Message-ID: Subject: [REGRESSION] "split bio_kmalloc from bio_alloc_bioset" causing crash shortly after bootup To: Christoph Hellwig , Johannes Thumshirn , Chaitanya Kulkarni , Damien Le Moal , Jens Axboe , David Anderson Cc: Alistair Delva , Todd Kjos , Amit Pundir , YongQin Liu , lkml , linux-block@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey all, In testing Linus' HEAD today I found another[1] regression in the block merge. This time I see a crash on my hikey960 board shortly after booting ASOP. See the log below. I bisected the issue down to "block: split bio_kmalloc from bio_alloc_bioset": https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3175199ab0ac8c874ec25c6bf169f74888917435 But unfortunately that does not revert cleanly against Linus' HEAD. It seems like the issue is that the function is no longer handling the case where the bio_set *bs is NULL as is done here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/blk-crypto-fallback.c#n230 If there's anything I can do to help debug this issue, please let me know! thanks -john [1]: "add a disk_uevent helper" also was giving me trouble as reported here: https://lore.kernel.org/lkml/CALAqxLU3B8YcS_MTnr2Lpasvn8oLJvD2qO4hkfkZeEwVNfeHXg@mail.gmail.com/ [ 34.600558] Unable to handle kernel read from unreadable memory at virtual address 0000000000000068 [ 34.609819] Mem abort info: [ 34.612644] ESR = 0x96000005 [ 34.615707] EC = 0x25: DABT (current EL), IL = 32 bits [ 34.621157] SET = 0, FnV = 0 [ 34.624288] EA = 0, S1PTW = 0 [ 34.628312] Data abort info: [ 34.631236] ISV = 0, ISS = 0x00000005 [ 34.635222] CM = 0, WnR = 0 [ 34.638186] user pgtable: 4k pages, 39-bit VAs, pgdp=000000000774f000 [ 34.644639] [0000000000000068] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 34.653381] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 34.658954] Modules linked in: [ 34.662007] CPU: 0 PID: 173 Comm: kworker/u16:3 Not tainted 5.11.0-04196-ga8e8932e4ae #559 [ 34.670270] Hardware name: HiKey960 (DT) [ 34.674190] Workqueue: writeback wb_workfn (flush-8:48) [ 34.679429] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 34.685435] pc : bio_alloc_bioset+0x14/0x230 [ 34.689720] lr : bio_clone_fast+0x28/0x80 [ 34.693728] sp : ffffffc012a13530 [ 34.697036] x29: ffffffc012a13530 x28: 0000000000003400 [ 34.702351] x27: 0000000000000000 x26: ffffff8001993040 [ 34.703203] dwmmc_k3 ff3ff000.dwmmc2: Unexpected interrupt latency [ 34.707662] x25: 0000000000000001 x24: ffffff8001fc8800 [ 34.719145] x23: ffffffffffffffff x22: ffffffc012a137e8 [ 34.724456] x21: 0000000000000c00 x20: ffffff8001fc8800 [ 34.729767] x19: 0000000000000800 x18: fffffffe013efe80 [ 34.735078] x17: 0000000000000068 x16: fffffffe012aa440 [ 34.740389] x15: 0000000000001000 x14: ffffff8001fc8800 [ 34.745700] x13: ffffff805c3e4000 x12: 00000000001ce000 [ 34.751009] x11: 00000000000000fb x10: 0000000000001000 [ 34.756320] x9 : 0000000000000033 x8 : 00000000000d9000 [ 34.761631] x7 : 0000000000000000 x6 : 000000000000a000 [ 34.766941] x5 : 0000000000000c00 x4 : 0000000000001000 [ 34.772251] x3 : 0000000000000000 x2 : 0000000000000000 [ 34.777561] x1 : 0000000000000000 x0 : 0000000000000c00 [ 34.782873] Call trace: [ 34.784901] ueventd: LoadWithAliases was unable to load platform:regulatory [ 34.785313] bio_alloc_bioset+0x14/0x230 [ 34.796189] bio_clone_fast+0x28/0x80 [ 34.799848] bio_split+0x50/0xd0 [ 34.803072] blk_crypto_fallback_encrypt_bio+0x2ec/0x5e8 [ 34.808384] blk_crypto_fallback_bio_prep+0xfc/0x140 [ 34.813345] __blk_crypto_bio_prep+0x13c/0x150 [ 34.817784] submit_bio_noacct+0x3c0/0x548 [ 34.821880] submit_bio+0x48/0x200 [ 34.825278] ext4_io_submit+0x50/0x68 [ 34.828939] ext4_writepages+0x558/0xca8 [ 34.832860] do_writepages+0x58/0x108 [ 34.836522] __writeback_single_inode+0x44/0x510 [ 34.841137] writeback_sb_inodes+0x1e0/0x4a8 [ 34.845404] __writeback_inodes_wb+0x78/0xe8 [ 34.849670] wb_writeback+0x274/0x3e8 [ 34.853328] wb_workfn+0x308/0x5f0 [ 34.856726] process_one_work+0x1ec/0x4d0 [ 34.860734] worker_thread+0x44/0x478 [ 34.864392] kthread+0x140/0x150 [ 34.867618] ret_from_fork+0x10/0x30 [ 34.871197] Code: a9ba7bfd 910003fd f9000bf3 7900bfa1 (f9403441) [ 34.877289] ---[ end trace e6c2a3ab108278f0 ]--- [ 34.893636] Kernel panic - not syncing: Oops: Fatal exception