diff options
author | David Howells <[email protected]> | 2023-12-11 15:15:02 +0000 |
---|---|---|
committer | David Howells <[email protected]> | 2023-12-20 11:57:47 +0000 |
commit | 74cef6872ceaefb5b6c5c60641371ea28702d358 (patch) | |
tree | 625e298050a1987372b13c900ec9eb42f00c9b75 /lib/memory-notifier-error-inject.c | |
parent | 71f8b55bc30e82d6355e07811213d847981a32e2 (diff) |
afs: Fix dynamic root lookup DNS check
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 <[email protected]>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216637
Signed-off-by: David Howells <[email protected]>
Tested-by: Markus Suvanto <[email protected]>
cc: Marc Dionne <[email protected]>
cc: [email protected]
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions