public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libblockdev] rawhide: dm: Check dm_task_run return value in bd_dm_map_exists (#2549531)
@ 2026-10-15 13:34 Vojtech Trefny
  0 siblings, 0 replies; only message in thread
From: Vojtech Trefny @ 2026-10-15 13:34 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libblockdev
Branch : rawhide
Commit : 13d1d831c795d43e180bce021f0cd571102c4919
Author : Vojtech Trefny <vtrefny@redhat.com>
Date   : 2026-10-15T15:23:39+02:00
Stats  : +36/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libblockdev/c/13d1d831c795d43e180bce021f0cd571102c4919?branch=rawhide

Log:
dm: Check dm_task_run return value in bd_dm_map_exists (#2549531)

---
diff --git a/0001-Check-dm_task_run-return-value-in-bd_dm_map_exists.patch b/0001-Check-dm_task_run-return-value-in-bd_dm_map_exists.patch
new file mode 100644
index 0000000..f7e6a5b
--- /dev/null
+++ b/0001-Check-dm_task_run-return-value-in-bd_dm_map_exists.patch
@@ -0,0 +1,30 @@
+From d6ae21eaf265d4b45e3e22560e8ec2ca887a6066 Mon Sep 17 00:00:00 2001
+From: Vojtech Trefny <vtrefny@redhat.com>
+Date: Wed, 14 Oct 2026 15:18:05 +0200
+Subject: [PATCH] dm: Check dm_task_run return value in bd_dm_map_exists
+
+---
+ src/plugins/dm.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/dm.c b/src/plugins/dm.c
+index 44e54b7c..0525888b 100644
+--- a/src/plugins/dm.c
++++ b/src/plugins/dm.c
+@@ -368,9 +368,14 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
+         return FALSE;
+     }
+ 
+-    dm_task_run (task_list);
+-    names = dm_task_get_names (task_list);
++    if (!dm_task_run (task_list)) {
++        g_set_error_literal (error, BD_DM_ERROR, BD_DM_ERROR_TASK,
++                             "Failed to run DM task");
++        dm_task_destroy (task_list);
++        return FALSE;
++    }
+ 
++    names = dm_task_get_names (task_list);
+     if (!names || !names->dev) {
+         dm_task_destroy (task_list);
+         return FALSE;

diff --git a/libblockdev.spec b/libblockdev.spec
index 6cc3dfa..bb43800 100644
--- a/libblockdev.spec
+++ b/libblockdev.spec
@@ -86,12 +86,14 @@
 
 Name:        libblockdev
 Version:     3.5.0
-Release:     4%{?dist}
+Release:     5%{?dist}
 Summary:     A library for low-level manipulation with block devices
 License:     LGPL-2.1-or-later
 URL:         https://github.com/storaged-project/libblockdev
 Source0:     https://github.com/storaged-project/libblockdev/releases/download/%{version}/%{name}-%{version}.tar.gz
 
+Patch0:      0001-Check-dm_task_run-return-value-in-bd_dm_map_exists.patch
+
 BuildRequires: make
 BuildRequires: glib2-devel
 %if %{with_gi}
@@ -958,6 +960,9 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
 %files plugins-all
 
 %changelog
+* Thu Oct 15 2026 Vojtech Trefny <vtrefny@redhat.com> - 3.5.0-5
+- dm: Check dm_task_run return value in bd_dm_map_exists (#2549531)
+
 * Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 3.5.0-4
 - Rebuilt for Python 3.15.0b4 ABI change
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-15 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 13:34 [rpms/libblockdev] rawhide: dm: Check dm_task_run return value in bd_dm_map_exists (#2549531) Vojtech Trefny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox