Skip to content

debugfs: fixes to "file removal race" series

Nicolai Stange lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3debugfs: remove extra debugfs_create_file_unsafe() declarationfs/debugfs/internal.h+0 -40 replies
2/3debugfs: full_proxy_open(): free proxy on ->open() failurefs/debugfs/file.c+4 -20 replies
3/3debugfs: open_proxy_open(): avoid double fops releasefs/debugfs/file.c+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] debugfs: fixes to "file removal race" series

Hi Greg,

the recent report by Sasha Levin made me review my debugfs "file removal race" series again.

For your reference, the original series in question was posted here:
http://lkml.kernel.org/g/[email protected]
It has been merged through your driver-core tree into mainline.

Unfortunately, I found three issues:

The first one is a minor code style issue.
The second one is more serious: on ->open() failure, references to modules as well as memory are leaked.
The third one is a potential leak of module references with future debugfs users.

The patches don't depend on each other and are unrelated except that they all address issues introduced by the same series.
I tested them with linux-next 20160523.

Apologies and thanks,

Nicolai

Nicolai Stange (3):
debugfs: remove extra debugfs_create_file_unsafe() declaration
debugfs: full_proxy_open(): free proxy on ->open() failure
debugfs: open_proxy_open(): avoid double fops release

 fs/debugfs/file.c     | 7 ++++---
 fs/debugfs/internal.h | 4 ----
 2 files changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
2.8.2