aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-sancloud/recipes-kernel
diff options
context:
space:
mode:
authorPaul Barker <paul.barker@sancloud.com>2022-01-31 10:54:55 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-01-31 17:44:47 +0000
commita12a83ebdfcd4287264e50edf3b11a156f418ae9 (patch)
tree46c263d32b6d0986b4c3a3f3c05d8aeb50a5dcd6 /meta-agl-bsp/meta-sancloud/recipes-kernel
parent13a9ec819b88636a11786689a9d39fa0d6a30e68 (diff)
meta-agl-bsp: meta-sancloud: Revert problematic kernel commit
Linux 5.10.y commit 4b21d4e820bb causes a backtrace to be printed on boot: [ 3.244915] ------------[ cut here ]------------ [ 3.249608] WARNING: CPU: 0 PID: 1 at block/blk-mq.c:3045 blk_mq_release+0x78/0xe8 [ 3.257337] Modules linked in: [ 3.260422] CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.65-sc1 #1 [ 3.266670] Hardware name: Generic AM33XX (Flattened Device Tree) [ 3.272822] [<c010e880>] (unwind_backtrace) from [<c010b2bc>] (show_stack+0x10/0x14) [ 3.280681] [<c010b2bc>] (show_stack) from [<c0129160>] (__warn+0xec/0x104) [ 3.287740] [<c0129160>] (__warn) from [<c0b16b34>] (warn_slowpath_fmt+0x64/0xc8) [ 3.295302] [<c0b16b34>] (warn_slowpath_fmt) from [<c04ef948>] (blk_mq_release+0x78/0xe8) [ 3.303580] [<c04ef948>] (blk_mq_release) from [<c04e20f4>] (blk_release_queue+0xb0/0x120) [ 3.311889] [<c04e20f4>] (blk_release_queue) from [<c0573b84>] (kobject_put+0x90/0xfc) [ 3.319900] [<c0573b84>] (kobject_put) from [<c04f4eb8>] (disk_release+0xa0/0xd8) [ 3.327441] [<c04f4eb8>] (disk_release) from [<c06f8c30>] (device_release+0x30/0xa0) [ 3.335232] [<c06f8c30>] (device_release) from [<c0573b84>] (kobject_put+0x90/0xfc) [ 3.342929] [<c0573b84>] (kobject_put) from [<c072c474>] (nbd_dev_add+0x20c/0x260) [ 3.350551] [<c072c474>] (nbd_dev_add) from [<c112aa0c>] (nbd_init+0xfc/0x11c) [ 3.357824] [<c112aa0c>] (nbd_init) from [<c0101ef0>] (do_one_initcall+0x44/0x26c) [ 3.365445] [<c0101ef0>] (do_one_initcall) from [<c11010b8>] (kernel_init_freeable+0x1c4/0x224) [ 3.374196] [<c11010b8>] (kernel_init_freeable) from [<c0b23ad0>] (kernel_init+0x8/0x120) [ 3.382411] [<c0b23ad0>] (kernel_init) from [<c0100148>] (ret_from_fork+0x14/0x2c) [ 3.390023] Exception stack(0xc18dffb0 to 0xc18dfff8) [ 3.395106] ffa0: 00000000 00000000 00000000 00000000 [ 3.403329] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 3.411542] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 3.418203] ---[ end trace de955d2022fa8082 ]--- This commit was reverted in Linux 5.10.66 but the Sancloud kernel tree is based on Linux 5.10.65. For now we can simply carry the patch to revert this change in meta-agl-bsp. Bug-AGL: SPEC-4156 Signed-off-by: Paul Barker <paul.barker@sancloud.com> Change-Id: I448037f3273c6ee249facb14c42fe93fbfd0c27b Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27120 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-sancloud/recipes-kernel')
-rw-r--r--meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/0001-Revert-block-nbd-add-sanity-check-for-first_minor.patch47
-rw-r--r--meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend2
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/0001-Revert-block-nbd-add-sanity-check-for-first_minor.patch b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/0001-Revert-block-nbd-add-sanity-check-for-first_minor.patch
new file mode 100644
index 000000000..3b92bc350
--- /dev/null
+++ b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/0001-Revert-block-nbd-add-sanity-check-for-first_minor.patch
@@ -0,0 +1,47 @@
+From 36b3d70d866d6781db4ab4c575b8bdab79244c7f Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 16 Sep 2021 10:17:11 +0200
+Subject: [PATCH] Revert "block: nbd: add sanity check for first_minor"
+
+This reverts commit 4b21d4e820bb9a1415ec76dfe565e4c5937337dd which is
+commit b1a811633f7321cf1ae2bb76a66805b7720e44c9 upstream.
+
+The backport of this is reported to be causing some problems, so revert
+this for now until they are worked out.
+
+Link: https://lore.kernel.org/r/CACPK8XfUWoOHr-0RwRoYoskia4fbAbZ7DYf5wWBnv6qUnGq18w@mail.gmail.com
+Reported-by: Joel Stanley <joel@jms.id.au>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: Pavel Skripkin <paskripkin@gmail.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Cc: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/nbd.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
+index 98274ba0701d..59c452fff835 100644
+--- a/drivers/block/nbd.c
++++ b/drivers/block/nbd.c
+@@ -1759,17 +1759,7 @@ static int nbd_dev_add(int index)
+ refcount_set(&nbd->refs, 1);
+ INIT_LIST_HEAD(&nbd->list);
+ disk->major = NBD_MAJOR;
+-
+- /* Too big first_minor can cause duplicate creation of
+- * sysfs files/links, since first_minor will be truncated to
+- * byte in __device_add_disk().
+- */
+ disk->first_minor = index << part_shift;
+- if (disk->first_minor > 0xff) {
+- err = -EINVAL;
+- goto out_free_idr;
+- }
+-
+ disk->fops = &nbd_fops;
+ disk->private_data = nbd;
+ sprintf(disk->disk_name, "nbd%d", index);
+--
+2.34.1
+
diff --git a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend
index b3709a24b..d5e19efd4 100644
--- a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend
+++ b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend
@@ -3,3 +3,5 @@ require recipes-kernel/linux/linux-agl.inc
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
AGL_KCONFIG_FRAGMENTS += "cma-256.cfg"
+
+SRC_URI += "file://0001-Revert-block-nbd-add-sanity-check-for-first_minor.patch"