lkml.org 
[lkml]   [1999]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Race in coda_readdir()
	coda_readdir() calls ->readdir() method of caching object without
holding the semaphore on it. Patch below is against 2.2.2-pre5.

--- linux/fs/coda/dir.c Tue Feb 16 11:53:48 1999
+++ linux/fs/coda/dir.c.new Fri Feb 19 02:20:50 1999
@@ -637,7 +637,9 @@
result = coda_venus_readdir(&open_file, dirent, filldir);
} else {
/* potemkin case: we are handed a directory inode */
+ down(&cnp->ovp->i_sem);
result = open_file.f_op->readdir(&open_file, dirent, filldir);
+ up(&cnp->ovp->i_sem);
}
coda_restore_codafile(inode, file, cnp->c_ovp, &open_file);
EXIT;
Cheers,
Al


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site