public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Vojtech Trefny <vtrefny@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libblockdev] f45: dm: Check dm_task_run return value in bd_dm_map_exists (#2549531)
Date: Thu, 15 Oct 2026 13:45:59 GMT	[thread overview]
Message-ID: <179207195913.1.5519545976731050435.rpms-libblockdev-c128c19da031@fedoraproject.org> (raw)

A new commit has been pushed.

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

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
 

                 reply	other threads:[~2026-10-15 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179207195913.1.5519545976731050435.rpms-libblockdev-c128c19da031@fedoraproject.org \
    --to=vtrefny@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox