diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-06-17 10:49:24 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-06-17 13:45:02 +0100 |
commit | 64ce39210f5469687c9e583e0af7e0d322c35dd5 (patch) | |
tree | a67c5869eef3622f8945fa1d1ba40fc46e725ee6 /meta/recipes-core/util-linux | |
parent | 99c023029100528cb2a2ccf4ce0c9c6c4bbe2055 (diff) | |
download | poky-64ce39210f5469687c9e583e0af7e0d322c35dd5.tar.gz |
util-linux: backport a patch to address mkswap hangs
(From OE-Core rev: 4d50d6f708477da0a5314a3749275d87101374d9)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch | 29 |
2 files changed, 30 insertions, 0 deletions
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 | |||
35 | file://run-ptest \ | 35 | file://run-ptest \ |
36 | file://display_testname_for_subtest.patch \ | 36 | file://display_testname_for_subtest.patch \ |
37 | file://avoid_parallel_tests.patch \ | 37 | file://avoid_parallel_tests.patch \ |
38 | file://8a3a74160b96498d672e3652827aa7e6d7f3a120.patch \ | ||
38 | " | 39 | " |
39 | SRC_URI[sha256sum] = "bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5" | 40 | 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 @@ | |||
1 | From 8a3a74160b96498d672e3652827aa7e6d7f3a120 Mon Sep 17 00:00:00 2001 | ||
2 | From: Karel Zak <kzak@redhat.com> | ||
3 | Date: Tue, 15 Jun 2021 12:04:43 +0200 | ||
4 | Subject: [PATCH] mkswap: fix holes detection (infinite loop and/or | ||
5 | stack-buffer-underflow) | ||
6 | |||
7 | Reported-by: Brian Lane <bcl@redhat.com> | ||
8 | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877 | ||
9 | Fix: https://github.com/karelzak/util-linux/issues/1348 | ||
10 | Signed-off-by: Karel Zak <kzak@redhat.com> | ||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | disk-utils/mkswap.c | 2 ++ | ||
15 | 1 file changed, 2 insertions(+) | ||
16 | |||
17 | diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c | ||
18 | index 27374fd72..c45a3a317 100644 | ||
19 | --- a/disk-utils/mkswap.c | ||
20 | +++ b/disk-utils/mkswap.c | ||
21 | @@ -267,6 +267,8 @@ static void check_extents(struct mkswap_control *ctl) | ||
22 | return; | ||
23 | |||
24 | n = fiemap->fm_mapped_extents; | ||
25 | + if (n == 0) | ||
26 | + break; | ||
27 | |||
28 | for (i = 0; i < n; i++) { | ||
29 | struct fiemap_extent *e = &fiemap->fm_extents[i]; | ||