Skip to content
Commit 9886e836 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

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: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1e23502c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment