mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
cifs_get_link(): bail out in unsafe case
->d_revalidate() bails out there, anyway. It's not enough to prevent getting into ->get_link() in RCU mode, but that could happen only in a very contrieved setup. Not worth trying to do anything fancy here unless ->d_revalidate() stops kicking out of RCU mode at least in some cases. Reviewed-by: Christian Brauner <brauner@kernel.org> Acked-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
053fc4f755
commit
0511fdb4a3
1 changed files with 3 additions and 0 deletions
|
|
@ -1172,6 +1172,9 @@ const char *cifs_get_link(struct dentry *dentry, struct inode *inode,
|
|||
{
|
||||
char *target_path;
|
||||
|
||||
if (!dentry)
|
||||
return ERR_PTR(-ECHILD);
|
||||
|
||||
target_path = kmalloc(PATH_MAX, GFP_KERNEL);
|
||||
if (!target_path)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue