linux-stable/fs/afs
David Howells a51dfaa208 afs: Fix missing cell comparison in afs_test_super()
commit 106bc79843 upstream.

Fix missing cell comparison in afs_test_super().  Without this, any pair
volumes that have the same volume ID will share a superblock, no matter the
cell, unless they're in different network namespaces.

Normally, most users will only deal with a single cell and so they won't
see this.  Even if they do look into a second cell, they won't see a
problem unless they happen to hit a volume with the same ID as one they've
already got mounted.

Before the patch:

    # ls /afs/grand.central.org/archive
    linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
    # ls /afs/kth.se/
    linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
    # cat /proc/mounts | grep afs
    none /afs afs rw,relatime,dyn,autocell 0 0
    #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
    #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
    #grand.central.org:root.archive /afs/kth.se afs ro,relatime 0 0

After the patch:

    # ls /afs/grand.central.org/archive
    linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
    # ls /afs/kth.se/
    admin/        common/  install/  OldFiles/  service/  system/
    bakrestores/  home/    misc/     pkg/       src/      wsadmin/
    # cat /proc/mounts | grep afs
    none /afs afs rw,relatime,dyn,autocell 0 0
    #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
    #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
    #kth.se:root.cell /afs/kth.se afs ro,relatime 0 0

Fixes: ^1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Carsten Jacobi <jacobi@de.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
Tested-by: Jonathan Billings <jsbillings@jsbillings.org>
cc: Todd DeSantis <atd@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:01 +01:00
..
addr_list.c Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:32:04 +09:00
afs.h afs: Rearrange status mapping 2018-04-09 21:53:59 +01:00
afs_cm.h
afs_fs.h afs: Prospectively look up extra files when doing a single lookup 2018-04-09 21:12:31 +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
cache.c fscache: Pass object size in rather than calling back for it 2018-04-06 14:05:14 +01:00
callback.c afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
cell.c afs: Fix leak in afs_lookup_cell_rcu() 2019-09-10 10:33:52 +01:00
cmservice.c afs: Fix the CB.ProbeUuid service handler to reply correctly 2019-09-06 10:21:54 +02:00
dir.c afs: Only update d_fsdata if different in afs_d_revalidate() 2019-09-06 10:21:55 +02:00
dir_edit.c afs: Locally edit directory data for mkdir/create/unlink/... 2018-04-09 21:54:48 +01:00
dynroot.c afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP 2020-01-09 10:18:57 +01:00
file.c fs: afs: Fix a possible null-pointer dereference in afs_put_read() 2019-09-06 10:21:54 +02:00
flock.c afs: Fix key refcounting in file locking code 2019-02-27 10:08:56 +01:00
fsclient.c Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:32:04 +09:00
inode.c afs: Fix key refcounting in file locking code 2019-02-27 10:08:56 +01:00
internal.h afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
Kconfig
main.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
Makefile afs: Handle CONFIG_PROC_FS=n 2018-06-15 00:52:55 -04:00
misc.c afs: Consolidate abort_to_error translators 2017-11-13 15:38:17 +00:00
mntpt.c afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
netdevices.c afs: Implement network namespacing 2018-05-23 12:01:15 +01:00
proc.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
rotate.c rxrpc: Fix handling of call quietly cancelled out on server 2018-06-04 16:06:26 -04:00
rxrpc.c afs: Handle EIO from delivery function 2018-11-27 16:13:00 +01:00
security.c afs: Fix directory permissions check 2018-05-16 21:35:23 +01:00
server.c afs: Fix afs_find_server lookups for ipv4 peers 2020-01-09 10:18:55 +01:00
server_list.c afs: Fix refcounting in callback registration 2018-05-14 13:17:35 +01:00
super.c afs: Fix missing cell comparison in afs_test_super() 2020-01-17 19:47:01 +01:00
vlclient.c afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u() 2019-09-06 10:21:54 +02:00
volume.c afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
write.c afs: Unlock pages for __pagevec_release() 2019-05-16 19:41:21 +02:00
xattr.c afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
xdr_fs.h afs: Adjust the directory XDR structures 2018-04-09 21:54:48 +01:00