kernel_samsung_a53x/fs/afs
David Howells ba288eee4e afs: Fix dynamic root lookup DNS check
[ Upstream commit 74cef6872ceaefb5b6c5c60641371ea28702d358 ]

In the afs dynamic root directory, the ->lookup() function does a DNS check
on the cell being asked for and if the DNS upcall reports an error it will
report an error back to userspace (typically ENOENT).

However, if a failed DNS upcall returns a new-style result, it will return
a valid result, with the status field set appropriately to indicate the
type of failure - and in that case, dns_query() doesn't return an error and
we let stat() complete with no error - which can cause confusion in
userspace as subsequent calls that trigger d_automount then fail with
ENOENT.

Fix this by checking the status result from a valid dns_query() and
returning an error if it indicates a failure.

Fixes: bbb4c4323a4d ("dns: Allow the dns resolver to retrieve a server set")
Reported-by: Markus Suvanto <markus.suvanto@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216637
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Markus Suvanto <markus.suvanto@gmail.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:11:59 +01:00
..
addr_list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs_cm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs_fs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs_vl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
callback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cell.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cmservice.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dir_edit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dir_silly.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dynroot.c afs: Fix dynamic root lookup DNS check 2024-11-18 12:11:59 +01:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_operation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsclient.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
internal.h afs: Fix afs_server_list to be cleaned up with RCU 2024-11-18 12:10:54 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mntpt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protocol_uae.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protocol_yfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rotate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rxrpc.c afs: Fix refcount underflow from error handling race 2024-11-18 12:11:48 +01:00
security.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
server.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
server_list.c afs: Fix afs_server_list to be cleaned up with RCU 2024-11-18 12:10:54 +01:00
super.c afs: Fix file locking on R/O volumes to operate in local mode 2024-11-18 12:10:55 +01:00
vl_alias.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vl_list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vl_probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vl_rotate.c afs: Return ENOENT if no cell DNS record can be found 2024-11-18 12:10:55 +01:00
vlclient.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
volume.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
write.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdr_fs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
yfsclient.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00