[SSI] openssi/kernel/cluster/ssi/cfs cfs_ipcshm.c,1.22,1.23

Roger Tsang <[email protected]> Fri, 05 Mar 2010 06:25:38 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8504/kernel/cluster/ssi/cfs

Modified Files:
      Tag: OPENSSI-FC
	cfs_ipcshm.c 
Log Message:
IPC:
- Fix uninitialized iodb_timestamp.
- Fix ssi_growary() can cause array bounds violation when value of iodb_size is
  increased beyond the static size of object table.
- Fix ipcname_failover_data() dereferencing invalid ipc_obj structure; objp
  pointer is uninitialized.
- Fix shmem_svr_lookup() ignored cli_ipcname_getid() error and looked up id 0.
- Fix shmem_svr_lookup() always creates obj with id 0.

IPC (#ifdef SSI_IPC_OBJ_DB_LOCKLESS):
- Remove NSC_IPC_RD/WRLOCK() global object database mutex.
- Implement reference counting for ipc_obj structure.
- Implement lockless iodb_active[] traversal.
- Fix ipcname_failover_data() iodb_seq race with another objsvr_new() thread.
- Remove redundant objsvr_find_key() lookup's in ipcname_getid() path when
  objsvr_new() raced with another.

 cluster/ssi/cfs/cfs_ipcshm.c   |   15 -
 cluster/ssi/ipc/ipc.h          |   26 +
 cluster/ssi/ipc/namesvr_clnt.c |    6 
 cluster/ssi/ipc/namesvr_func.c |  463 ++++++++++++++++++++++++++++++++-
 include/linux/config.h         |    5 
 5 files changed, 495 insertions(+), 20 deletions(-)


Index: cfs_ipcshm.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/cfs_ipcshm.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cfs_ipcshm.c	17 Dec 2009 06:43:50 -0000	1.22
+++ cfs_ipcshm.c	5 Mar 2010 06:25:36 -0000	1.23
@@ -319,10 +319,10 @@
 shmem_svr_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
 {
 	struct inode *inode;
-	long id;
 	clusternode_t svr;
-       	int size;
-	int real_key;
+	global_id_t id;
+	key_t real_key;
+	int size, error;
 
 	if (!is_shm_mmap(dentry, 1)) {
 #ifdef CONFIG_TMPFS
@@ -330,10 +330,15 @@
 #endif
 		return NULL;
 	}
-	id = svr = size = 0;
+
 	sscanf(dentry->d_name.name, "SYSV%x", &real_key);
-	cli_ipcname_getid(NAME_SERVICE_SHM, real_key, 0, &id, &svr, 
+	id = -1;
+	svr = size = 0;
+	error = cli_ipcname_getid(NAME_SERVICE_SHM, real_key, 0, &id, &svr,
 						ssi_get_localview(), &size);
+	if (error)
+		return ERR_PTR(error);
+
 #ifdef IPC_SHM_RACE_FIX
 	ipc_get_locks(0, &shm_ids_svr, 1);
 #endif


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev