]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
AFS: Stop readlink() on AFS crashing due to NULL 'file' ptr
authorDavid Howells <dhowells@redhat.com>
Thu, 27 Aug 2009 12:09:06 +0000 (13:09 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Aug 2009 19:22:08 +0000 (12:22 -0700)
commit9886e836a6a5dbd273dc55b17e713f0a188d137f
tree87f8e3d719ae43d5d5d5911d70d6c7b3aa66be32
parent1e23502cc57cef33455ac7cb9111e3c6d991a894
AFS: Stop readlink() on AFS crashing due to NULL 'file' ptr

kAFS crashes when asked to read a symbolic link because page_getlink()
passes a NULL file pointer to read_mapping_page(), but afs_readpage()
expects a file pointer from which to extract a key.

Modify afs_readpage() to request the appropriate key from the calling
process's keyrings if a file struct is not supplied with one attached.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/file.c