lkml.org 
[lkml]   [2016]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] debugfs: fix double unlock in open_proxy_open()
Date
In case an open is racing with a debugfs file removal, the corresponding
error path in open_proxy_open() releases its SRCU read side critical
section twice, i.e. it does a double unlock.

Fix that by purging the extra unlock operation.

Signed-off-by: Nicolai Stange <nicstange@gmail.com>
---
fs/debugfs/file.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 6a4b667..9c1c9a0 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -108,7 +108,6 @@ static int open_proxy_open(struct inode *inode, struct file *filp)

r = debugfs_use_file_start(dentry, &srcu_idx);
if (r) {
- debugfs_use_file_finish(srcu_idx);
r = -ENOENT;
goto out;
}
--
2.7.2
\
 
 \ /
  Last update: 2016-03-12 16:41    [W:1.112 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site