]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Protect call->state changes against signals
authorDavid Howells <dhowells@redhat.com>
Thu, 2 Nov 2017 15:27:53 +0000 (15:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 13 Nov 2017 15:38:21 +0000 (15:38 +0000)
commit399d5056e36946ac7467c3b87765b3a4fba39aa5
treee0108e6306a6fde29bf7d5348f730922a18dc2b1
parent44c9f06f7b95bb113d0b2b600114aa7286fc6b9c
afs: Protect call->state changes against signals

Protect call->state changes against the call being prematurely terminated
due to a signal.

What can happen is that a signal causes afs_wait_for_call_to_complete() to
abort an afs_call because it's not yet complete whilst afs_deliver_to_call()
is delivering data to that call.

If the data delivery causes the state to change, this may overwrite the state
of the afs_call, making it not-yet-complete again - but no further
notifications will be forthcoming from AF_RXRPC as the rxrpc call has been
aborted and completed, so kAFS will just hang in various places waiting for
that call or on page bits that need clearing by that call.

A tracepoint to monitor call state changes is also provided.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/cmservice.c
fs/afs/internal.h
fs/afs/rxrpc.c
include/trace/events/afs.h