forked from pool/util-linux
add util-linux-lib-sysfs-deinit.patch (bnc#714151)
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=91
This commit is contained in:
parent
5afac4e80d
commit
d6869f2b7e
29
util-linux-lib-sysfs-deinit.patch
Normal file
29
util-linux-lib-sysfs-deinit.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From cf06399d6aeb1e558baf2b46b617496ed7aac81c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Petr Uzel <petr.uzel@suse.cz>
|
||||||
|
Date: Mon, 12 Sep 2011 16:11:41 +0200
|
||||||
|
Subject: [PATCH] lib: do not attempt to close(0) in sysfs_deinit()
|
||||||
|
|
||||||
|
If the 'open' fails we 'goto err' which runs 'sysfs_deinit()' on a 'cxt'
|
||||||
|
which hasn't been fully initialised. The 'dir_fd' is still 0, so
|
||||||
|
sysfs_deinit calls "close(0)".
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=714151
|
||||||
|
Reported-by: Diego Ercolani <diego.ercolani@gmail.com>
|
||||||
|
Analysed-by: Neil Brown <nfbrown@suse.com>
|
||||||
|
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
||||||
|
---
|
||||||
|
lib/sysfs.c | 1 +
|
||||||
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
Index: util-linux-2.20/lib/sysfs.c
|
||||||
|
===================================================================
|
||||||
|
--- util-linux-2.20.orig/lib/sysfs.c
|
||||||
|
+++ util-linux-2.20/lib/sysfs.c
|
||||||
|
@@ -140,6 +140,7 @@ int sysfs_init(struct sysfs_cxt *cxt, de
|
||||||
|
int fd, rc = 0;
|
||||||
|
|
||||||
|
memset(cxt, 0, sizeof(*cxt));
|
||||||
|
+ cxt->dir_fd = -1;
|
||||||
|
|
||||||
|
if (!sysfs_devno_path(devno, path, sizeof(path)))
|
||||||
|
goto err;
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com
|
||||||
|
|
||||||
|
- add util-linux-lib-sysfs-deinit.patch (bnc#714151)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com
|
Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
|
|||||||
# crypto patch
|
# crypto patch
|
||||||
Patch2: util-linux-2.17.1-mount_losetup_crypto.patch
|
Patch2: util-linux-2.17.1-mount_losetup_crypto.patch
|
||||||
Patch3: util-linux-sfdisk-manpage-fix.patch
|
Patch3: util-linux-sfdisk-manpage-fix.patch
|
||||||
|
Patch4: util-linux-lib-sysfs-deinit.patch
|
||||||
|
|
||||||
##
|
##
|
||||||
## adjtimex
|
## adjtimex
|
||||||
@ -189,6 +190,7 @@ Files to develop applications using the libmount library.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
#
|
#
|
||||||
cd adjtimex-*
|
cd adjtimex-*
|
||||||
|
Loading…
Reference in New Issue
Block a user