patch-2.2.2 linux/fs/autofs/waitq.c

Next file: linux/fs/buffer.c
Previous file: linux/fs/autofs/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.1/linux/fs/autofs/waitq.c linux/fs/autofs/waitq.c
@@ -99,13 +99,17 @@
 		autofs_catatonic_mode(sbi);
 }
 
-int autofs_wait(struct autofs_sb_info *sbi, struct qstr * name)
+int autofs_wait(struct autofs_sb_info *sbi, struct qstr *name)
 {
 	struct autofs_wait_queue *wq;
 	int status;
 
 	/* In catatonic mode, we don't wait for nobody */
 	if ( sbi->catatonic )
+		return -ENOENT;
+	
+	/* We shouldn't be able to get here, but just in case */
+	if ( name->len > NAME_MAX )
 		return -ENOENT;
 
 	for ( wq = sbi->queues ; wq ; wq = wq->next ) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)