linux/fs/afs
David Howells f8ea5c7bce afs: Fix afs_do_lookup() to call correct fetch-status op variant
Fix afs_do_lookup()'s fallback case for when FS.InlineBulkStatus isn't
supported by the server.

In the fallback, it calls FS.FetchStatus for the specific vnode it's
meant to be looking up.  Commit b6489a49f7 broke this by renaming one
of the two identically-named afs_fetch_status_operation descriptors to
something else so that one of them could be made non-static.  The site
that used the renamed one, however, wasn't renamed and didn't produce
any warning because the other was declared in a header.

Fix this by making afs_do_lookup() use the renamed variant.

Note that there are two variants of the success method because one is
called from ->lookup() where we may or may not have an inode, but can't
call iget until after we've talked to the server - whereas the other is
called from within iget where we have an inode, but it may or may not be
initialised.

The latter variant expects there to be an inode, but because it's being
called from there former case, there might not be - resulting in an oops
like the following:

  BUG: kernel NULL pointer dereference, address: 00000000000000b0
  ...
  RIP: 0010:afs_fetch_status_success+0x27/0x7e
  ...
  Call Trace:
    afs_wait_for_operation+0xda/0x234
    afs_do_lookup+0x2fe/0x3c1
    afs_lookup+0x3c5/0x4bd
    __lookup_slow+0xcd/0x10f
    walk_component+0xa2/0x10c
    path_lookupat.isra.0+0x80/0x110
    filename_lookup+0x81/0x104
    vfs_statx+0x76/0x109
    __do_sys_newlstat+0x39/0x6b
    do_syscall_64+0x4c/0x78
    entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: b6489a49f7 ("afs: Fix silly rename")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-20 12:01:58 -07:00
..
addr_list.c afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t 2020-03-13 10:47:33 -07:00
afs_cm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_vl.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
afs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callback.c afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
cell.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
cmservice.c afs: Fix handling of CB.ProbeUuid cache manager op 2020-06-04 15:37:57 +01:00
dir_edit.c afs: Remove set but not used variables 'before', 'after' 2019-11-21 20:36:00 +00:00
dir_silly.c afs: Fix silly rename 2020-06-16 22:00:28 +01:00
dir.c afs: Fix afs_do_lookup() to call correct fetch-status op variant 2020-06-20 12:01:58 -07:00
dynroot.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
file.c afs: Fix use of afs_check_for_remote_deletion() 2020-06-16 16:26:57 +01:00
flock.c afs: Fix use of afs_check_for_remote_deletion() 2020-06-16 16:26:57 +01:00
fs_operation.c afs: Fix use of afs_check_for_remote_deletion() 2020-06-16 16:26:57 +01:00
fs_probe.c afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly 2020-06-04 15:37:58 +01:00
fsclient.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
inode.c afs: Fix silly rename 2020-06-16 22:00:28 +01:00
internal.h afs: Fix silly rename 2020-06-16 22:00:28 +01:00
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
main.c afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
Makefile afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
misc.c afs: Fix the mapping of the UAEOVERFLOW abort code 2020-06-15 15:41:03 +01:00
mntpt.c afs: Fix mountpoint parsing 2019-12-11 16:56:54 +00:00
proc.c afs: Fix memory leak in afs_put_sysnames() 2020-06-09 15:22:06 +01:00
protocol_uae.h afs: Add support for the UAE error table 2019-06-28 18:37:53 +01:00
protocol_yfs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
rotate.c afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly 2020-06-04 15:37:58 +01:00
rxrpc.c AFS Changes 2020-06-05 16:26:36 -07:00
security.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
server_list.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
server.c afs: Don't use probe running state to make decisions outside probe code 2020-06-04 15:37:58 +01:00
super.c afs: Fix afs_statfs() to not let the values go below zero 2020-06-04 15:37:58 +01:00
vl_alias.c afs: Fix debugging statements with %px to be %p 2020-06-09 18:17:14 +01:00
vl_list.c fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer() 2019-10-30 08:44:27 -07:00
vl_probe.c rxrpc: Fix the excessive initial retransmission timeout 2020-05-11 16:42:28 +01:00
vl_rotate.c afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op 2020-06-04 15:37:57 +01:00
vlclient.c afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
volume.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
write.c afs: Fix truncation issues and mmap writeback size 2020-06-15 15:41:02 +01:00
xattr.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
xdr_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
yfsclient.c afs: Fix yfs_fs_fetch_status() to honour vnode selector 2020-06-16 16:26:57 +01:00