diff mbox series

[langdale,20/28] lttng-modules: fix for kernel 6.2+

Message ID 5d36b42406d7cbc152008c9de364eb4187c64b3b.1677430770.git.steve@sakoman.com
State New
Headers show
Series [langdale,01/28] less: backport the fix for CVE-2022-46663 | expand

Commit Message

Steve Sakoman Feb. 26, 2023, 5:02 p.m. UTC
From: Bruce Ashfield <bruce.ashfield@gmail.com>

Backporting a patching from the 2.13.x stable branch of lttng
to fix the build against kernel 6.2+.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3aed7dfe5ff6f52497dcffa58bc2f06cf709ea18)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 ...ccessor-helpers-into-accessors.h-v6..patch | 45 +++++++++++++++++++
 .../lttng/lttng-modules_2.13.8.bb             |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch
diff mbox series

Patch

diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch
new file mode 100644
index 0000000000..26ae605b31
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch
@@ -0,0 +1,45 @@ 
+From 69d3aa79a641f539cfd5c11b46b2dd9b4df9b0f0 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 16 Jan 2023 15:01:51 -0500
+Subject: [PATCH] fix: btrfs: move accessor helpers into accessors.h (v6.2)
+
+See upstream commit :
+
+  commit 07e81dc94474eb62705c6f96d9ab1a5a797b8703
+  Author: Josef Bacik <josef@toxicpanda.com>
+  Date:   Wed Oct 19 10:51:00 2022 -0400
+
+    btrfs: move accessor helpers into accessors.h
+
+    This is a large patch, but because they're all macros it's impossible to
+    split up.  Simply copy all of the item accessors in ctree.h and paste
+    them in accessors.h, and then update any files to include the header so
+    everything compiles.
+
+Upstream-Status: Backport
+
+Change-Id: I1f0876dd8b7a8687f6802b60c3e3baabd017cc52
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ include/instrumentation/events/btrfs.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
+index 785f16ac..01157107 100644
+--- a/include/instrumentation/events/btrfs.h
++++ b/include/instrumentation/events/btrfs.h
+@@ -9,6 +9,10 @@
+ #include <linux/writeback.h>
+ #include <lttng/kernel-version.h>
+ 
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
++#include <../fs/btrfs/accessors.h>
++#endif
++
+ #ifndef _TRACE_BTRFS_DEF_
+ #define _TRACE_BTRFS_DEF_
+ struct btrfs_root;
+-- 
+2.34.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb
index 3cfc1bc58e..c04796be16 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb
@@ -13,6 +13,7 @@  SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0009-Rename-genhd-wrapper-to-blkdev.patch \
            file://fix-jbd2-use-the-correct-print-format-v5.10.163.patch \
            file://fix-jbd2-upper-bound-for-v5.10.163.patch \
+           file://0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch \
            "
 
 # Use :append here so that the patch is applied also when using devupstream