All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] unlock_kernel() in autofs
@ 2009-04-07  7:53 Dan Carpenter
  2009-04-08  6:40 ` Ian Kent
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2009-04-07  7:53 UTC (permalink / raw)
  To: hpa; +Cc: autofs

There are a couple missing unlock_kernel() calls on error paths in autofs 
version 2.6.29.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/fs/autofs/root.c	2009-04-07 08:24:53.000000000 +0300
+++ devel/fs/autofs/root.c	2009-04-07 08:27:35.000000000 +0300
@@ -334,8 +334,10 @@
 	autofs_hash_insert(dh,ent);
 
 	inode = autofs_iget(dir->i_sb, ent->ino);
-	if (IS_ERR(inode))
+	if (IS_ERR(inode)) {
+		unlock_kernel();
 		return PTR_ERR(inode);
+	}
 
 	d_instantiate(dentry, inode);
 	unlock_kernel();
@@ -480,6 +482,7 @@
 	inode = autofs_iget(dir->i_sb, ino);
 	if (IS_ERR(inode)) {
 		drop_nlink(dir);
+		unlock_kernel();
 		return PTR_ERR(inode);
 	}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-08 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07  7:53 [patch] unlock_kernel() in autofs Dan Carpenter
2009-04-08  6:40 ` Ian Kent
2009-04-08 13:00   ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.