* [PATCH] util-linux: backport a patch to address mkswap hangs
@ 2021-06-17 8:49 Alexander Kanavin
2021-06-17 9:34 ` [OE-core] " Chen Qi
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2021-06-17 8:49 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/recipes-core/util-linux/util-linux.inc | 1 +
...74160b96498d672e3652827aa7e6d7f3a120.patch | 29 +++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 6a7a6a968f..9d7d8a23aa 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -35,5 +35,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
file://run-ptest \
file://display_testname_for_subtest.patch \
file://avoid_parallel_tests.patch \
+ file://8a3a74160b96498d672e3652827aa7e6d7f3a120.patch \
"
SRC_URI[sha256sum] = "bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5"
diff --git a/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch b/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
new file mode 100644
index 0000000000..a5bb00ab65
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
@@ -0,0 +1,29 @@
+From 8a3a74160b96498d672e3652827aa7e6d7f3a120 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 15 Jun 2021 12:04:43 +0200
+Subject: [PATCH] mkswap: fix holes detection (infinite loop and/or
+ stack-buffer-underflow)
+
+Reported-by: Brian Lane <bcl@redhat.com>
+Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877
+Fix: https://github.com/karelzak/util-linux/issues/1348
+Signed-off-by: Karel Zak <kzak@redhat.com>
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ disk-utils/mkswap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
+index 27374fd72..c45a3a317 100644
+--- a/disk-utils/mkswap.c
++++ b/disk-utils/mkswap.c
+@@ -267,6 +267,8 @@ static void check_extents(struct mkswap_control *ctl)
+ return;
+
+ n = fiemap->fm_mapped_extents;
++ if (n == 0)
++ break;
+
+ for (i = 0; i < n; i++) {
+ struct fiemap_extent *e = &fiemap->fm_extents[i];
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] util-linux: backport a patch to address mkswap hangs
2021-06-17 8:49 [PATCH] util-linux: backport a patch to address mkswap hangs Alexander Kanavin
@ 2021-06-17 9:34 ` Chen Qi
2021-06-17 9:43 ` Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Chen Qi @ 2021-06-17 9:34 UTC (permalink / raw)
To: Alexander Kanavin, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2696 bytes --]
The patch name seems a little weird? The commit id is better to be put
in 'Upstream-Status: Backport [xxxx]'.
Regards,
Chen Qi
On 06/17/2021 04:49 PM, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
> meta/recipes-core/util-linux/util-linux.inc | 1 +
> ...74160b96498d672e3652827aa7e6d7f3a120.patch | 29 +++++++++++++++++++
> 2 files changed, 30 insertions(+)
> create mode 100644 meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
>
> diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
> index 6a7a6a968f..9d7d8a23aa 100644
> --- a/meta/recipes-core/util-linux/util-linux.inc
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -35,5 +35,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
> file://run-ptest \
> file://display_testname_for_subtest.patch \
> file://avoid_parallel_tests.patch \
> + file://8a3a74160b96498d672e3652827aa7e6d7f3a120.patch \
> "
> SRC_URI[sha256sum] = "bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5"
> diff --git a/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch b/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
> new file mode 100644
> index 0000000000..a5bb00ab65
> --- /dev/null
> +++ b/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
> @@ -0,0 +1,29 @@
> +From 8a3a74160b96498d672e3652827aa7e6d7f3a120 Mon Sep 17 00:00:00 2001
> +From: Karel Zak <kzak@redhat.com>
> +Date: Tue, 15 Jun 2021 12:04:43 +0200
> +Subject: [PATCH] mkswap: fix holes detection (infinite loop and/or
> + stack-buffer-underflow)
> +
> +Reported-by: Brian Lane <bcl@redhat.com>
> +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877
> +Fix: https://github.com/karelzak/util-linux/issues/1348
> +Signed-off-by: Karel Zak <kzak@redhat.com>
> +Upstream-Status: Backport
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + disk-utils/mkswap.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
> +index 27374fd72..c45a3a317 100644
> +--- a/disk-utils/mkswap.c
> ++++ b/disk-utils/mkswap.c
> +@@ -267,6 +267,8 @@ static void check_extents(struct mkswap_control *ctl)
> + return;
> +
> + n = fiemap->fm_mapped_extents;
> ++ if (n == 0)
> ++ break;
> +
> + for (i = 0; i < n; i++) {
> + struct fiemap_extent *e = &fiemap->fm_extents[i];
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 4035 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] util-linux: backport a patch to address mkswap hangs
2021-06-17 9:34 ` [OE-core] " Chen Qi
@ 2021-06-17 9:43 ` Alexander Kanavin
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2021-06-17 9:43 UTC (permalink / raw)
To: ChenQi; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
On Thu, 17 Jun 2021 at 11:24, ChenQi <Qi.Chen@windriver.com> wrote:
> The patch name seems a little weird? The commit id is better to be put in
> 'Upstream-Status: Backport [xxxx]'.
>
I fetched directly from github. It's going to be dropped on next version
upgrade, so doesn't really matter.
Alex
[-- Attachment #2: Type: text/html, Size: 710 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-17 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-17 8:49 [PATCH] util-linux: backport a patch to address mkswap hangs Alexander Kanavin
2021-06-17 9:34 ` [OE-core] " Chen Qi
2021-06-17 9:43 ` Alexander Kanavin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.