Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356434 > unrolled thread
| Started by | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| First post | 2016-03-12 16:10 +0100 |
| Last post | 2016-03-12 16:30 +0100 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] debugfs: fix double unlock in open_proxy_open() Nicolai Stange <nicstange@gmail.com> - 2016-03-12 16:10 +0100
Re: [PATCH] debugfs: fix double unlock in open_proxy_open() Nicolai Stange <nicstange@gmail.com> - 2016-03-12 16:30 +0100
Re: [PATCH] debugfs: fix double unlock in open_proxy_open() Nicolai Stange <nicstange@gmail.com> - 2016-03-12 16:30 +0100
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Date | 2016-03-12 16:10 +0100 |
| Subject | [PATCH] debugfs: fix double unlock in open_proxy_open() |
| Message-ID | <rbTkZ-7Va-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Date | 2016-03-12 16:30 +0100 |
| Message-ID | <rbTEl-8aZ-1@gated-at.bofh.it> |
| In reply to | #1356434 |
Nicolai Stange <nicstange@gmail.com> writes: > 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. This one has been reported by Rasmus Villemoes: http://lkml.kernel.org/g/87d1r2uh95.fsf@rasmusvillemoes.dk Thank you very much! Nicolai
[toc] | [prev] | [next] | [standalone]
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Date | 2016-03-12 16:30 +0100 |
| Message-ID | <rbTEl-8aZ-7@gated-at.bofh.it> |
| In reply to | #1356434 |
Ah and sorry: applicable to the driver-core tree's driver-core-testing branch.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web