diff --git a/0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch b/0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch new file mode 100644 index 0000000000000000000000000000000000000000..0cdf96ed463dfc36e7bf5c8828c091605ff5f8b8 --- /dev/null +++ b/0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch @@ -0,0 +1,30 @@ +From 65d23a1d75013f328e9a3a1914484514621822ef Mon Sep 17 00:00:00 2001 +From: wangzhiqiang +Date: Wed, 30 Aug 2023 15:47:42 -0500 +Subject: [PATCH] vgchange: acquire an exclusive VG lock for refresh + +Concurrent vgchange --refresh commands can lead to hung +tasks in dm code. + +Signed-off-by: wangzhiqiang +--- + tools/vgchange.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/vgchange.c b/tools/vgchange.c +index e2d3dad02..8c1d605c6 100644 +--- a/tools/vgchange.c ++++ b/tools/vgchange.c +@@ -1008,7 +1008,8 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv) + + if (update) + flags |= READ_FOR_UPDATE; +- else if (arg_is_set(cmd, activate_ARG)) ++ else if (arg_is_set(cmd, activate_ARG) || ++ arg_is_set(cmd, refresh_ARG)) + flags |= READ_FOR_ACTIVATE; + + if (!(handle = init_processing_handle(cmd, NULL))) { +-- +2.33.0 + diff --git a/lvm2.spec b/lvm2.spec index 734ceed216a3ead398eb93f54f0c1a636fb264ac..ae2de202bfc3c35d58bfd79f18224fe116cfc8df 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -43,7 +43,7 @@ Name: lvm2 Version: 2.03.09 -Release: 17 +Release: 18 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD @@ -76,6 +76,7 @@ Patch24: 0024-udev-import-previous-results-of-blkid-when-in-suspen.patch patch25: 0025-toollib-fix-segfault-if-using-S-select-with-log-repo.patch Patch26: 0026-dm-event-release-buffer-on-dm_event_get_version.patch patch27: 0027-clean-up-group-struct-in-_stats_create_group-error-path.patch +Patch28: 0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -501,6 +502,9 @@ fi %changelog +* Thu Feb 22 2024 wangzhiqiang - 8:2.03.09-18 +- vgchange: acquire an exclusive VG lock for refresh + * Tue Dec 19 2023 wuyifeng - 8:2.03.09-17 - fix an double free in the error path from _stats_creat_group