Add patch to fix sockopt in kernel 6.16
(cherry picked from commit 1271d175cb7fe0f9705080a665aba7602e1ee673) Resolves: RHEL-106597
This commit is contained in:
parent
8b379ddab2
commit
13f0a378cc
27
4b1d9da51dc2703b7596243cb555a689bb27b4c1.patch
Normal file
27
4b1d9da51dc2703b7596243cb555a689bb27b4c1.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 4b1d9da51dc2703b7596243cb555a689bb27b4c1 Mon Sep 17 00:00:00 2001
|
||||
From: Luca Boccassi <luca.boccassi@gmail.com>
|
||||
Date: Wed, 16 Apr 2025 21:17:56 +0100
|
||||
Subject: [PATCH] util/sockopt: also check for ESRCH when the process has
|
||||
exited
|
||||
|
||||
The kernel in 6.16 is changing the return value from EINVAL to ESRCH so
|
||||
that the particular case can be distinguished from generic errors:
|
||||
|
||||
https://lore.kernel.org/all/20250411-work-pidfs-enoent-v2-2-60b2d3bb545f@kernel.org/
|
||||
---
|
||||
src/util/sockopt.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/util/sockopt.c b/src/util/sockopt.c
|
||||
index a374e59d..4270314d 100644
|
||||
--- a/src/util/sockopt.c
|
||||
+++ b/src/util/sockopt.c
|
||||
@@ -238,7 +238,7 @@ int sockopt_get_peerpidfd(int fd, int *pidfdp) {
|
||||
return SOCKOPT_E_UNSUPPORTED;
|
||||
if (errno == ENODATA)
|
||||
return SOCKOPT_E_UNAVAILABLE;
|
||||
- if (errno == EINVAL)
|
||||
+ if (errno == EINVAL || errno == ESRCH)
|
||||
return SOCKOPT_E_REAPED;
|
||||
|
||||
return error_origin(-errno);
|
||||
@ -7,6 +7,8 @@ Summary: Linux D-Bus Message Broker
|
||||
License: Apache-2.0 AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND (Apache-2.0 OR LGPL-2.1-or-later)
|
||||
URL: https://github.com/bus1/dbus-broker
|
||||
Source0: https://github.com/bus1/dbus-broker/releases/download/v%{version}/dbus-broker-%{version}.tar.xz
|
||||
Patch: https://github.com/bus1/dbus-broker/commit/4b1d9da51dc2703b7596243cb555a689bb27b4c1.patch
|
||||
|
||||
BuildRequires: pkgconfig(audit)
|
||||
BuildRequires: pkgconfig(expat)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user