Patch "afs: Make error on cell lookup failure consistent with OpenAFS" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    afs: Make error on cell lookup failure consistent with OpenAFS

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     afs-make-error-on-cell-lookup-failure-consistent-wit.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3e0cd7f7352c32f49358baa91d8aaa6a6377b2f8
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Thu Jun 8 09:43:54 2023 +0100

    afs: Make error on cell lookup failure consistent with OpenAFS
    
    [ Upstream commit 2a4ca1b4b77850544408595e2433f5d7811a9daa ]
    
    When kafs tries to look up a cell in the DNS or the local config, it will
    translate a lookup failure into EDESTADDRREQ whereas OpenAFS translates it
    into ENOENT.  Applications such as West expect the latter behaviour and
    fail if they see the former.
    
    This can be seen by trying to mount an unknown cell:
    
       # mount -t afs %example.com:cell.root /mnt
       mount: /mnt: mount(2) system call failed: Destination address required.
    
    Fixes: 4d673da14533 ("afs: Support the AFS dynamic root")
    Reported-by: Markus Suvanto <markus.suvanto@xxxxxxxxx>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=216637
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Reviewed-by: Jeffrey Altman <jaltman@xxxxxxxxxxxx>
    cc: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
    cc: linux-afs@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index f07e53ab808e3..45007d96a402d 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -38,8 +38,8 @@ static int afs_probe_cell_name(struct dentry *dentry)
 
 	ret = dns_query(net->net, "afsdb", name, len, "srv=1",
 			NULL, NULL, false);
-	if (ret == -ENODATA)
-		ret = -EDESTADDRREQ;
+	if (ret == -ENODATA || ret == -ENOKEY)
+		ret = -ENOENT;
 	return ret;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux