[SSI] openssi/kernel/include/cluster/ssi/ipc unixnm.h,1.15,1.16

Roger Tsang <[email protected]>
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/ipc
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23689/include/cluster/ssi/ipc

Modified Files:
      Tag: OPENSSI-FC
	unixnm.h 
Log Message:
CFS:
- Fix possible server token table hash key race with PFS file handle data.
- Further avoid ssi_get_super() to reduce contention. We don't cross mount points.
- Switch to Linux get_empty_filp() to get unused file structure for svrcfstok structure.
- Regression:
  - Possible inode leak when out of memory doing export ops get_dentry. (#ifdef CFS_EXPORT_OPS)
  - Possibly missed drop_super() while performing export ops get_dentry. (#ifdef CFS_FH_TO_DENTRY_ANON)

IPC:
- Fix uninitialized spin lock in kern_ipc_perm structure (in SSI context).
- Fix uninitialized linked list pointers in unixnm_svr_entry and unixnm_cache_entry structures.
- SHM dentry lookup bug fixes:
  - Error -ENOENT in CFS (negative dentry) due to not validating against PFS.
  - Fix SHM negative dentry lookup could cause future memory corruption.
    - Did not increment inode count when instantiating dentry.
    - Bad dentry reference count side-effect due to incorrect return value for Linux namespace architecture.

IPVS:
- Fix uninitialized linked list pointers in ipvs_dirinfo and portweight_list structures.

SSI:
- Fix dentry race calling __d_path() outside dcache lock. (#ifdef SSI_DCACHE_RACE_FIX)
- Fix uninitialized linked list pointers in structures rmtfb_cmn, ssidev_hash, fifonm_svr_entry, fifonm_cache_entry, and ssipty_svr_
entry.

VPROC:
- Fix possibly missed drop_super() during process migration exporting of file descriptors.
- Fix partially initialized proc_root_readdir_cookie structure.
- semundo_load_msg() handle process sysvsem.undo_list->proc_list race take two. (#ifdef VPROC_UNLOAD_SETSCHED_SMP)
- Regression:
  - Process migration traversing rmtfb path while importing SHM fd's; caused by fb_svrnode macro. (#ifdef REOP_EXPORT_PATH_SVRNODE)


Index: unixnm.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/ipc/unixnm.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- unixnm.h	9 Feb 2009 05:00:36 -0000	1.15
+++ unixnm.h	19 Feb 2009 08:01:02 -0000	1.16
@@ -67,7 +67,7 @@
 #endif
 extern spinlock_t rmtunix_cache_listlock;
 #ifdef RCU_RMTUNIX_CACHE
-extern void rmtunix_dealloc(struct rcu_head *);
+extern void rmtunix_dealloc(struct rmtunix_socket_info *);
 #endif
 
 #ifdef RMTUNIX_SOCK_INFO_CACHE
@@ -220,20 +220,24 @@
 		might_sleep();
 	if (!atomic_dec_and_lock(&info->rsk_refcnt, &rmtunix_cache_listlock))
 		return;
-	LOCK_SPIN_LOCK(&info->rsk_spinlock);
-	if (atomic_read(&info->rsk_refcnt)) {
+	if (info->sk) {
+		SSI_ASSERT(info->rsk_cached);
+		LOCK_SPIN_LOCK(&info->rsk_spinlock);
+		if (atomic_read(&info->rsk_refcnt)) {
+			UNLOCK_SPIN_LOCK(&info->rsk_spinlock);
+			spin_unlock(&rmtunix_cache_listlock);
+			return;
+		}
+		info->rsk_cached = 0;
 		UNLOCK_SPIN_LOCK(&info->rsk_spinlock);
-		spin_unlock(&rmtunix_cache_listlock);
-		return;
-	}
-	info->rsk_cached = 0;
-	UNLOCK_SPIN_LOCK(&info->rsk_spinlock);
-	list_del_rcu(&info->list);
+	} else
+		BUG_ON(info->rsk_cached);
 #ifdef DEBUG
 	--rmtunix_cache_size;
 #endif
+	list_del_rcu(&info->list);
 	spin_unlock(&rmtunix_cache_listlock);
-	call_rcu(&info->rhead, rmtunix_dealloc);
+	rmtunix_dealloc(info);
 #else /* !RCU_RMTUNIX_CACHE */
 #ifdef IPC_STALE_RMTUNIX_CACHE_FIX
 	if (!atomic_dec_and_test(&info->rsk_refcnt)) {


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.