mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
99c0230291
commit
64ce39210f
@@ -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"
|
||||
|
||||
+29
@@ -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];
|
||||
Reference in New Issue
Block a user