kernel_optimize_test/fs/afs
David Howells 51eba99970 afs: Fix "kAFS: AFS vnode with undefined type 0"
Under some circumstances afs_select_fileserver() can return without setting
an error in fc->error.  The problem is in the no_more_servers segment where
the accumulated errors from attempts to contact various servers are
integrated into an afs_error-type variable 'e'.  The resultant error code
is, however, then abandoned.

Fix this by getting the error out of e.error and putting it in 'error' so
that the next part will store it into fc->error.

Not doing this causes a report like the following:

    kAFS: AFS vnode with undefined type 0
    kAFS: A=0 m=0 s=0 v=0
    kAFS: vnode 20000025:1:1

because the code following the server selection loop then sees what it
thinks is a successful invocation because fc.error is 0.  However, it can't
apply the status record because it's all zeros.

The report is followed on the first instance with a trace looking something
like:

     dump_stack+0x67/0x8e
     afs_inode_init_from_status.isra.2+0x21b/0x487
     afs_fetch_status+0x119/0x1df
     afs_iget+0x130/0x295
     afs_get_tree+0x31d/0x595
     vfs_get_tree+0x1f/0xe8
     fc_mount+0xe/0x36
     afs_d_automount+0x328/0x3c3
     follow_managed+0x109/0x20a
     lookup_fast+0x3bf/0x3f8
     do_last+0xc3/0x6a4
     path_openat+0x1af/0x236
     do_filp_open+0x51/0xae
     ? _raw_spin_unlock+0x24/0x2d
     ? __alloc_fd+0x1a5/0x1b7
     do_sys_open+0x13b/0x1e8
     do_syscall_64+0x7d/0x1b3
     entry_SYSCALL_64_after_hwframe+0x49/0xbe

Fixes: 4584ae96ae ("afs: Fix missing net error handling")
Signed-off-by: David Howells <dhowells@redhat.com>
2019-05-16 15:48:20 +01:00
..
addr_list.c dns_resolver: Allow used keys to be invalidated 2019-05-15 17:35:54 +01:00
afs_cm.h
afs_fs.h afs: implement acl setting 2019-05-07 16:48:44 +01:00
afs_vl.h afs: Make use of the YFS service upgrade to fully support IPv6 2017-11-13 15:38:19 +00:00
afs.h afs: Expand data structure fields to support YFS 2018-10-24 00:41:08 +01:00
cache.c afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS 2018-10-24 00:41:08 +01:00
callback.c afs: Fix in-progess ops to ignore server-level callback invalidation 2019-04-13 08:37:37 +01:00
cell.c afs: Fix cell DNS lookup 2019-05-16 12:58:23 +01:00
cmservice.c Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
dir_edit.c afs: Locally edit directory data for mkdir/create/unlink/... 2018-04-09 21:54:48 +01:00
dir_silly.c afs: Implement sillyrename for unlink and rename 2019-04-25 14:26:51 +01:00
dir.c afs: Log more information for "kAFS: AFS vnode with undefined type\n" 2019-05-07 16:48:44 +01:00
dynroot.c dns_resolver: Allow used keys to be invalidated 2019-05-15 17:35:54 +01:00
file.c afs: Fix key leak in afs_release() and afs_evict_inode() 2019-05-15 12:32:34 +01:00
flock.c AFS Development 2019-05-07 20:51:58 -07:00
fs_probe.c afs: Split wait from afs_make_call() 2019-04-25 14:26:50 +01:00
fsclient.c AFS Development 2019-05-07 20:51:58 -07:00
inode.c afs: Fix key leak in afs_release() and afs_evict_inode() 2019-05-15 12:32:34 +01:00
internal.h afs: Fix cell DNS lookup 2019-05-16 12:58:23 +01:00
Kconfig afs: Allow dumping of server cursor on operation failure 2018-10-24 00:41:09 +01:00
main.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
Makefile afs: Implement sillyrename for unlink and rename 2019-04-25 14:26:51 +01:00
misc.c afs: Mark expected switch fall-throughs 2019-04-08 18:35:56 -05:00
mntpt.c afs: Use fs_context to pass parameters over automount 2019-02-28 03:29:39 -05:00
netdevices.c afs: Implement network namespacing 2018-05-23 12:01:15 +01:00
proc.c afs: Fix afs_cell records to always have a VL server list record 2019-05-15 17:35:53 +01:00
protocol_yfs.h afs: Get YFS ACLs and information through xattrs 2019-05-07 16:48:44 +01:00
rotate.c afs: Fix "kAFS: AFS vnode with undefined type 0" 2019-05-16 15:48:20 +01:00
rxrpc.c AFS Development 2019-05-07 20:51:58 -07:00
security.c afs: Fix callback handling 2018-10-24 00:41:09 +01:00
server_list.c afs: Use struct_size() in kzalloc() 2019-01-10 17:12:05 +00:00
server.c afs: Fix in-progess ops to ignore server-level callback invalidation 2019-04-13 08:37:37 +01:00
super.c AFS Development 2019-05-07 20:51:58 -07:00
vl_list.c afs: Fix afs_cell records to always have a VL server list record 2019-05-15 17:35:53 +01:00
vl_probe.c afs: Split wait from afs_make_call() 2019-04-25 14:26:50 +01:00
vl_rotate.c afs: Fix cell DNS lookup 2019-05-16 12:58:23 +01:00
vlclient.c AFS Development 2019-05-07 20:51:58 -07:00
volume.c afs: Add fs_context support 2019-02-28 03:29:38 -05:00
write.c afs: Unlock pages for __pagevec_release() 2019-04-13 08:37:37 +01:00
xattr.c afs: Fix afs_xattr_get_yfs() to not try freeing an error value 2019-05-15 17:35:53 +01:00
xdr_fs.h afs: Adjust the directory XDR structures 2018-04-09 21:54:48 +01:00
yfsclient.c afs: Fix afs_xattr_get_yfs() to not try freeing an error value 2019-05-15 17:35:53 +01:00