Skip to main content

[xwin-commits] [solaris-x11~x-s11-update-clone:1409] 19146643 pciaccess leaks fds until Xorg says: can not open /dev/xsvc: Too

  • From:
  • To:
  • Subject: [xwin-commits] [solaris-x11~x-s11-update-clone:1409] 19146643 pciaccess leaks fds until Xorg says: can not open /dev/xsvc: Too
  • Date: Wed, 16 Jul 2014 21:47:00 +0000

Project:    solaris-x11
Repository: x-s11-update-clone
Revision:   1409
Author:     x-hg
Date:       2014-07-03 20:48:11 UTC
Link:       

Log Message:
------------
19146643 pciaccess leaks fds until Xorg says: can not open /dev/xsvc: Too 
many open files


Revisions:
----------
1409


Modified Paths:
---------------
open-src/lib/libpciaccess/Makefile


Added Paths:
------------
open-src/lib/libpciaccess/fd-leak.patch


Diffs:
------
diff -r 2283b29c5886 -r d8ce82ed3998 open-src/lib/libpciaccess/Makefile
--- a/open-src/lib/libpciaccess/Makefile        Wed Jul 09 11:14:32 2014 -0700
+++ b/open-src/lib/libpciaccess/Makefile        Thu Jul 03 13:48:11 2014 -0700
@@ -2,7 +2,7 @@
 #
 # libpciaccess - generic PCI access software library & scanpci utility
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights 
reserved.
+# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights 
reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -37,6 +37,7 @@
 
 # Patches to apply to source after unpacking, in order
 SOURCE_PATCHES = scanpci.man.patch 
+SOURCE_PATCHES += fd-leak.patch,-p1
 
 # Library name
 LIBNAME=libpciaccess

diff -r 2283b29c5886 -r d8ce82ed3998 open-src/lib/libpciaccess/fd-leak.patch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libpciaccess/fd-leak.patch   Thu Jul 03 13:48:11 2014 -0700
@@ -0,0 +1,35 @@
+From 1654a0462723b3b75d7a4a20bedfc653cc3e1f1a Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith 
< >
+Date: Wed, 2 Jul 2014 16:41:10 -0700
+Subject: [PATCH:libpciaccess] Solaris: Fix fd leak in
+ pci_device_solx_devfs_map_range()
+
+Caching fd's for reuse is most effective when you actually stick the
+newly opened fd in the cache, instead of letting it leak at the end
+of the function.
+
+Regression introduced by yours truly in commit 9f2d95e61896f41adb.
+
+Signed-off-by: Alan Coopersmith 
< >
+Reviewed-by: Randy Fishel 
< >
+---
+ src/solx_devfs.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/solx_devfs.c b/src/solx_devfs.c
+index 8e7ea9b..f572393 100644
+--- a/src/solx_devfs.c
++++ b/src/solx_devfs.c
+@@ -724,6 +724,9 @@ pci_device_solx_devfs_map_range(struct pci_device *dev,
+                          strerror(errno));
+           return err;
+       }
++#ifndef __sparc
++        xsvc_fd = map_fd;
++#endif
+     }

+     map->memory = mmap(NULL, map->size, prot, MAP_SHARED, map_fd, 
map->base);
+-- 
+1.7.9.2
+






[xwin-commits] [solaris-x11~x-s11-update-clone:1409] 19146643 pciaccess leaks fds until Xorg says: can not open /dev/xsvc: Too

x-hg 07/16/2014
 
 
Close
loading
Please Confirm
Close