]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Linux: Avoid deadlock in readdir - release GLOCK for filldir
authorMarc Dionne <marc.c.dionne@gmail.com>
Sun, 1 Nov 2009 21:03:17 +0000 (16:03 -0500)
committerRuss Allbery <rra@debian.org>
Wed, 4 Nov 2009 01:29:44 +0000 (17:29 -0800)
commitf23e80d7aef086c72067bb96a993a02fc29ed03a
tree9a008709ca7c92a8bea2d2ae5a3b0dcd27d75cc4
parent1b7ad28e9d7bab3ff117cda78c3c22a97500b4d4
Linux: Avoid deadlock in readdir - release GLOCK for filldir

The GLOCK is held while calling the filldir function in afs_linux_readdir().
If this function causes a page fault, and in particular if this fault
involves AFS, we're in trouble as we'll eventually deadlock in the
readpage code.
A simple test case for this is to call the getdents syscall on an
AFS directory with a buffer that is part of an mmaped AFS file.

This is already the case in the master branch; the change was part of
the merge of the NFS translator code.

FIXES 125555

Change-Id: I829838e45f94921d22335154587216f7842e3955
Reviewed-on: http://gerrit.openafs.org/760
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c