mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-09 02:41:03 +01:00
25 lines
649 B
Diff
25 lines
649 B
Diff
---
|
|
fs/dcache.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/fs/dcache.c
|
|
+++ b/fs/dcache.c
|
|
@@ -1983,7 +1983,7 @@ Elong:
|
|
asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
|
|
{
|
|
int error, len;
|
|
- struct path pwd, root;
|
|
+ struct path pwd, root, tmp;
|
|
char *page = (char *) __get_free_page(GFP_USER), *cwd;
|
|
|
|
if (!page)
|
|
@@ -1996,7 +1996,8 @@ asmlinkage long sys_getcwd(char __user *
|
|
path_get(&root);
|
|
read_unlock(¤t->fs->lock);
|
|
|
|
- cwd = __d_path(&pwd, &root, page, PAGE_SIZE, 0);
|
|
+ tmp = root;
|
|
+ cwd = __d_path(&pwd, &root, tmp, PAGE_SIZE, 0);
|
|
error = PTR_ERR(cwd);
|
|
if (IS_ERR(cwd))
|
|
goto out;
|