[SSI] openssi/kernel/cluster/ssi/util fifonm.c, 1.8, 1.9 nfs_mount.c, 1.10, 1.11 rmtfb.c, 1.21, 1.22 ssidev.c, 1.24, 1.25 ssidev_ics.c, 1.12, 1.13 ssipty.c, 1.12, 1.13
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23689/cluster/ssi/util
Modified Files:
Tag: OPENSSI-FC
fifonm.c nfs_mount.c rmtfb.c ssidev.c ssidev_ics.c ssipty.c
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: fifonm.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/fifonm.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- fifonm.c 7 Aug 2007 03:06:09 -0000 1.8
+++ fifonm.c 19 Feb 2009 08:01:02 -0000 1.9
@@ -300,12 +300,13 @@
/* no entry for this fifo */
*rval = -ENOMEM;
- newentry = kmalloc(sizeof(struct fifonm_svr_entry), GFP_USER);
+ newentry = kmalloc(sizeof(*newentry), GFP_USER);
if (!newentry)
return 0;
*rval = 0;
*svrnode = from_node;
+ INIT_LIST_HEAD(&newentry->hash);
newentry->ssidev = ssidev;
newentry->ino = ino;
newentry->server = from_node;
@@ -383,7 +384,7 @@
clusternode_t node;
int error, ret;
- entry = kmalloc(sizeof(struct fifonm_cache_entry), GFP_USER);
+ entry = kmalloc(sizeof(*entry), GFP_USER);
if (!entry)
return -ENOMEM;
@@ -403,6 +404,7 @@
goto unlock_out;
if (node == this_node) {
+ INIT_LIST_HEAD(&entry->list);
entry->inode = inode;
spin_lock(&fifonm_cache_listlock);
++fifonm_cache_size;
Index: rmtfb.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/rmtfb.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- rmtfb.c 3 Feb 2009 06:18:13 -0000 1.21
+++ rmtfb.c 19 Feb 2009 08:01:02 -0000 1.22
@@ -752,11 +752,9 @@
printk(KERN_INFO "rmtfb_getcli_id: looping\n");
loop = 0;
}
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(2);
+ idelay(2);
goto repeat;
- }
- if (rfb)
+ } else if (rfb)
goto out;
file = reop_make_file(path, flags, svr);
@@ -808,6 +806,7 @@
if (!cmn)
return NULL;
+ INIT_LIST_HEAD(&cmn->rfb_hash);
cmn->rfb_file = file;
cmn->rfb_id = id ? id : unum_getnum(unum_rmtfbid);
return cmn;
@@ -894,8 +893,7 @@
inode->u.generic_ip = (void *)(dp->d_inode->i_ino);
dput(dp);
}
- if (mp)
- mntput(mp);
+ mntput(mp);
}
}
#endif
Index: nfs_mount.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/nfs_mount.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- nfs_mount.c 10 Feb 2005 01:07:24 -0000 1.10
+++ nfs_mount.c 19 Feb 2009 08:01:02 -0000 1.11
@@ -48,8 +48,14 @@
if (!(page = __get_free_page(GFP_KERNEL)))
BUG();
+#ifdef SSI_DCACHE_RACE_FIX
+ spin_lock(&dcache_lock);
+#endif
dir_name =
__d_path(nd->dentry, nd->mnt, NULL, NULL, (char *)page, PAGE_SIZE);
+#ifdef SSI_DCACHE_RACE_FIX
+ spin_unlock(&dcache_lock);
+#endif
dir_name_len = strlen(dir_name) + 1;
Index: ssidev.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/ssidev.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ssidev.c 3 Feb 2009 06:18:13 -0000 1.24
+++ ssidev.c 19 Feb 2009 08:01:02 -0000 1.25
@@ -485,6 +485,7 @@
ssidev_lock_busy();
*rerror = ssidev_alloc_next(ssidevp);
if (*rerror == 0) {
+ INIT_LIST_HEAD(&newp->sd_list);
newp->sd_data.sd_devnode = CLUSTERNODE_INVAL;
newp->sd_data.sd_ssidev = *ssidevp;
newp->sd_data.sd_linuxdev = NODEV;
Index: ssipty.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/ssipty.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ssipty.c 7 Aug 2007 03:06:09 -0000 1.12
+++ ssipty.c 19 Feb 2009 08:01:02 -0000 1.13
@@ -343,7 +343,7 @@
rssipty_get_pty(clusternode_t node, int *rerror, clusternode_t from_node,
int ptymax, int *ptynum)
{
- struct ssipty_svr_entry *sep = NULL;
+ struct ssipty_svr_entry *sep;
*rerror = 0;
if (ptymax > SSIPTY_PTYS)
@@ -360,7 +360,9 @@
if (*ptynum >= ptymax) {
*rerror = -EIO;
kfree(sep);
+ goto out;
}
+ INIT_LIST_HEAD(&sep->sp_list);
sep->sp_ptysvr = from_node;
sep->sp_entry.sp_ptynum = *ptynum;
ssiptysvr_add_entry(sep);
Index: ssidev_ics.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/ssidev_ics.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ssidev_ics.c 3 Feb 2009 06:18:13 -0000 1.12
+++ ssidev_ics.c 19 Feb 2009 08:01:02 -0000 1.13
@@ -693,20 +693,19 @@
void ssidev_poll_svr_nodedown(clusternode_t node)
{
- struct list_head *ltmp, *lnext;
ssidev_poll_svr_t *psp;
#ifdef RCU_SSIDEV_POLL_SVR_LIST
rcu_read_lock();
- list_for_each_safe_rcu(ltmp, lnext, &ssidev_poll_svr_list) {
- psp = list_entry(ltmp, ssidev_poll_svr_t, ps_list);
+ list_for_each_entry_rcu(psp, &ssidev_poll_svr_list, ps_list) {
if (psp->ps_cnode == node &&
- !test_and_set_bit(ps_wakeup, &psp->ps_state) &&
- psp->ps_proc != NULL)
+ !test_and_set_bit(ps_wakeup, &psp->ps_state) && psp->ps_proc)
wake_up_process(psp->ps_proc);
}
rcu_read_unlock();
#else
+ struct list_head *ltmp, *lnext;
+
spin_lock(&ssidev_poll_svr_spinlock);
lnext = ssidev_poll_svr_list.next;
while (lnext != &ssidev_poll_svr_list) {
------------------------------------------------------------------------------
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