projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5c6b19
)
ceph: fix dangling pointer
author
Sage Weil
<sage@newdream.net>
Thu, 11 Nov 2010 23:24:06 +0000
(15:24 -0800)
committer
Sage Weil
<sage@newdream.net>
Thu, 11 Nov 2010 23:24:06 +0000
(15:24 -0800)
Clear fi->last_name when it's freed. The only caller is rewinddir() (or
equivalent lseek).
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/dir.c
patch
|
blob
|
history
diff --git
a/fs/ceph/dir.c
b/fs/ceph/dir.c
index e0a2dc6fcafcb62266909c5ec71329e58083d1d7..1e11ed716f853550b4a076a89dc5ddad6f4ea7c3 100644
(file)
--- a/
fs/ceph/dir.c
+++ b/
fs/ceph/dir.c
@@
-414,6
+414,7
@@
static void reset_readdir(struct ceph_file_info *fi)
fi->last_readdir = NULL;
}
kfree(fi->last_name);
+ fi->last_name = NULL;
fi->next_offset = 2; /* compensate for . and .. */
if (fi->dentry) {
dput(fi->dentry);