summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-11-11 15:24:06 -0800
committerSage Weil <sage@newdream.net>2010-11-11 15:24:06 -0800
commita1629c3b24f26ec1b0f534874af674a6b4c1540b (patch)
tree7b40b54486f68189cde9753aca31d8e3d8af61a2 /fs/ceph
parentc5c6b19d4b8f5431fca05f28ae9e141045022149 (diff)
downloadtalos-op-linux-a1629c3b24f26ec1b0f534874af674a6b4c1540b.tar.gz
talos-op-linux-a1629c3b24f26ec1b0f534874af674a6b4c1540b.zip
ceph: fix dangling pointer
Clear fi->last_name when it's freed. The only caller is rewinddir() (or equivalent lseek). Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index e0a2dc6fcafc..1e11ed716f85 100644
--- 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);
OpenPOWER on IntegriCloud