Skip to content

locks: better debugging and fix for setlk/close race handling

Jeff Layton linux-fsdevel lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 5 repliesIn review
  2. v11 patch 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6locks: fix unlock when fcntl_setlk races with a closefs/locks.c+30 -215 replies
2/6locks: don't check for race with close when setting OFD lockfs/locks.c+10 -60 replies
3/6locks: sprinkle some tracepoints around the file locking codefs/locks.c include/trace/events/filelock.h+86 -30 replies
4/6locks: pass inode pointer to locks_free_lock_contextfs/inode.c fs/locks.c include/linux/fs.h+6 -40 replies
5/6locks: prink more detail when there are leaked locksfs/locks.c+29 -40 replies
6/6locks: rename __posix_lock_file to posix_lock_inodefs/locks.c+6 -50 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/6] locks: better debugging and fix for setlk/close race handling

The first patch in this patchset fixes a very long-standing bug in the handling of races between setlk and close. That one should be appropriate for all stable kernels and should apply to most kernels as-is.

The second patch exempts OFD locks from setlk/close race handling since they shouldn't need it anyway. The rest of the patches add some better debugging for these problems and do a little function name cleanup.

I'm planning to go ahead and put these into linux-next today and send them to Linus for the 4.5 merge, unless there are any objections...

Jeff Layton (6):
locks: fix unlock when fcntl_setlk races with a close
locks: don't check for race with close when setting OFD lock
locks: sprinkle some tracepoints around the file locking code
locks: pass inode pointer to locks_free_lock_context
locks: prink more detail when there are leaked locks
locks: rename __posix_lock_file to posix_lock_inode

 fs/inode.c                      |   2 +-
 fs/locks.c                      | 123 +++++++++++++++++++++++++++-------------
 include/linux/fs.h              |   4 +-
 include/trace/events/filelock.h |  77 +++++++++++++++++++++++++
 4 files changed, 165 insertions(+), 41 deletions(-)
Signature · 1 line
2.5.0