[PATCH] Obscure possible bug in directory notify

From: Stephen Rothwell (sfr@linuxcare.com.au)
Date: Wed Nov 08 2000 - 01:40:44 EST


Hi Linus,

This patch fixes a place where we could return with a read/write
lock held. Also update MAINTAINERS and CREDITS files.

Cheers,
Stephen

-- 
Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax 
sfr@linuxcare.com.au, http://www.linuxcare.com/ 
Linuxcare. Support for the revolution.

diff -ruN 2.4.0-test11pre1/CREDITS 2.4.0-test11pre1-not1/CREDITS --- 2.4.0-test11pre1/CREDITS Wed Nov 8 10:07:59 2000 +++ 2.4.0-test11pre1-not1/CREDITS Wed Nov 8 17:09:20 2000 @@ -2240,11 +2240,12 @@ S: Germany N: Stephen Rothwell -E: sfr@linuxcare.com +E: sfr@linuxcare.com.au W: http://linuxcare.com.au/sfr P: 1024/BD8C7805 CD A4 9D 01 10 6E 7E 3B 91 88 FA D9 C8 40 AA 02 D: Boot/setup/build work for setup > 2K D: Author, APM driver +D: Directory notification S: 66 Maltby Circuit S: Wanniassa ACT 2903 S: Australia diff -ruN 2.4.0-test11pre1/MAINTAINERS 2.4.0-test11pre1-not1/MAINTAINERS --- 2.4.0-test11pre1/MAINTAINERS Wed Nov 1 09:36:12 2000 +++ 2.4.0-test11pre1-not1/MAINTAINERS Wed Nov 8 17:08:05 2000 @@ -353,6 +353,12 @@ L: digilnux@dgii.com S: Maintained +DIRECTORY NOTIFICATION +P: Stephen Rothwell +M: sfr@linuxcare.com.au +L: linux-kernel@vger.kernel.org +S: Supported + DISK GEOMETRY AND PARTITION HANDLING P: Andries Brouwer M: aeb@veritas.com diff -ruN 2.4.0-test11pre1/fs/dnotify.c 2.4.0-test11pre1-not1/fs/dnotify.c --- 2.4.0-test11pre1/fs/dnotify.c Wed Oct 4 10:37:09 2000 +++ 2.4.0-test11pre1-not1/fs/dnotify.c Wed Nov 8 17:06:08 2000 @@ -103,14 +103,14 @@ write_lock(&dn_lock); prev = &inode->i_dnotify; while ((dn = *prev) != NULL) { - if ((dn->dn_mask & event) == 0) { - prev = &dn->dn_next; - continue; - } if (dn->dn_magic != DNOTIFY_MAGIC) { printk(KERN_ERR "__inode_dir_notify: bad magic " "number in dnotify_struct!\n"); - return; + goto out; + } + if ((dn->dn_mask & event) == 0) { + prev = &dn->dn_next; + continue; } fown = &dn->dn_filp->f_owner; if (fown->pid) @@ -125,6 +125,7 @@ } if (changed) redo_inode_mask(inode); +out: write_unlock(&dn_lock); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 15 2000 - 21:00:11 EST