public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/super.c: Fix lock/unlock imbalance in sget_fc
@ 2018-06-20 13:10 Gustavo A. R. Silva
  2018-06-21  0:23 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-06-20 13:10 UTC (permalink / raw)
  To: David Howells, Alexander Viro
  Cc: linux-fsdevel, linux-kernel, Gustavo A. R. Silva

It seems a spin_unlock is missing before return at line 532: return old.

Addresses-Coverity-ID: 1470111 ("Missing unlock")
Fixes: 4f3911e76e19 ("vfs: Implement a filesystem superblock creation/configuration context")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 fs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/super.c b/fs/super.c
index 43400f5..ff24532 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -529,6 +529,7 @@ struct super_block *sget_fc(struct fs_context *fc,
 				destroy_unused_super(s);
 				s = NULL;
 			}
+			spin_unlock(&sb_lock);
 			return old;
 		}
 	}
-- 
2.7.4

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

end of thread, other threads:[~2018-06-21 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-20 13:10 [PATCH] fs/super.c: Fix lock/unlock imbalance in sget_fc Gustavo A. R. Silva
2018-06-21  0:23 ` Al Viro
2018-06-21 20:12   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox