projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'sound-5.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux-2.6-microblaze.git]
/
fs
/
ceph
/
mds_client.c
diff --git
a/fs/ceph/mds_client.c
b/fs/ceph/mds_client.c
index
a8a8f84
..
a516329
100644
(file)
--- a/
fs/ceph/mds_client.c
+++ b/
fs/ceph/mds_client.c
@@
-384,8
+384,8
@@
static int parse_reply_info_readdir(void **p, void *end,
}
done:
}
done:
- if (*p != end)
-
goto ba
d;
+ /* Skip over any unrecognized fields */
+
*p = en
d;
return 0;
bad:
return 0;
bad:
@@
-406,12
+406,10
@@
static int parse_reply_info_filelock(void **p, void *end,
goto bad;
info->filelock_reply = *p;
goto bad;
info->filelock_reply = *p;
- *p += sizeof(*info->filelock_reply);
- if (unlikely(*p != end))
-
goto ba
d;
+ /* Skip over any unrecognized fields */
+
*p = en
d;
return 0;
return 0;
-
bad:
return -EIO;
}
bad:
return -EIO;
}
@@
-425,18
+423,21
@@
static int parse_reply_info_create(void **p, void *end,
{
if (features == (u64)-1 ||
(features & CEPH_FEATURE_REPLY_CREATE_INODE)) {
{
if (features == (u64)-1 ||
(features & CEPH_FEATURE_REPLY_CREATE_INODE)) {
+ /* Malformed reply? */
if (*p == end) {
info->has_create_ino = false;
} else {
info->has_create_ino = true;
if (*p == end) {
info->has_create_ino = false;
} else {
info->has_create_ino = true;
-
info->ino = ceph_decode_64(p
);
+
ceph_decode_64_safe(p, end, info->ino, bad
);
}
}
+ } else {
+ if (*p != end)
+ goto bad;
}
}
- if (unlikely(*p != end))
-
goto ba
d;
+ /* Skip over any unrecognized fields */
+
*p = en
d;
return 0;
return 0;
-
bad:
return -EIO;
}
bad:
return -EIO;
}