]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Wait for outstanding async calls before closing rxrpc socket
authorDavid Howells <dhowells@redhat.com>
Thu, 7 Apr 2016 16:23:03 +0000 (17:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2016 19:34:40 +0000 (15:34 -0400)
commit6ae5c9aba531f8cd77f74dabc7522ef3ffd67994
tree5afe9c2ab7c1c0c56ea17cd72bd5895232aae07f
parent4dc43b0af0ec744e247414a2903ad9cc3f216f61
afs: Wait for outstanding async calls before closing rxrpc socket

The afs filesystem needs to wait for any outstanding asynchronous calls
(such as FS.GiveUpCallBacks cleaning up the callbacks lodged with a server)
to complete before closing the AF_RXRPC socket when unloading the module.

This may occur if the module is removed too quickly after unmounting all
filesystems.  This will produce an error report that looks like:

AFS: Assertion failed
1 == 0 is false
0x1 == 0x0 is false
------------[ cut here ]------------
kernel BUG at ../fs/afs/rxrpc.c:135!
...
RIP: 0010:[<ffffffffa004111c>] afs_close_socket+0xec/0x107 [kafs]
...
Call Trace:
 [<ffffffffa004a160>] afs_exit+0x1f/0x57 [kafs]
 [<ffffffff810c30a0>] SyS_delete_module+0xec/0x17d
 [<ffffffff81610417>] entry_SYSCALL_64_fastpath+0x12/0x6b

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fs/afs/rxrpc.c