]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix file locking
authorDavid Howells <dhowells@redhat.com>
Thu, 4 Jun 2020 20:31:39 +0000 (21:31 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 9 Jun 2020 14:22:06 +0000 (15:22 +0100)
commit253bc36aa4f66067a6b03413a0a5d51394442877
treea5473fbf8e54509339008b9a45e2ea336fe7c494
parentc56b5b286b661b6fc19ba5c91a5b258aab0ea15f
afs: Fix file locking

Fix AFS file locking to use the correct vnode pointer and remove a member
of the afs_operation struct that is never set, but it is read and followed,
causing an oops.

This can be triggered by:

flock -s /afs/example.com/foo sleep 1

when it calls the kernel to get a file lock.

Fixes: 511b1ded7178 ("afs: Build an abstraction around an "operation" concept")
Reported-by: Dave Botsch <botsch@cnf.cornell.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Dave Botsch <botsch@cnf.cornell.edu>
fs/afs/flock.c
fs/afs/internal.h