diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-05-02 08:06:50 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-05-07 13:43:05 -0400 |
commit | 4198aba4f431e2d2c24a11cdb9d53106fda00b43 (patch) | |
tree | 02fee8f9ea0bf955c2590d35cb8bd673d648742d | |
parent | b726ec972cf2122137fbc47847b4fcc7b3bc2801 (diff) |
ceph: fix unaligned access in ceph_send_cap_releases
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | fs/ceph/mds_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 5f3f375cf0e9..959b1bf7c327 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1855,7 +1855,8 @@ again: | |||
1855 | num_cap_releases--; | 1855 | num_cap_releases--; |
1856 | 1856 | ||
1857 | head = msg->front.iov_base; | 1857 | head = msg->front.iov_base; |
1858 | le32_add_cpu(&head->num, 1); | 1858 | put_unaligned_le32(get_unaligned_le32(&head->num) + 1, |
1859 | &head->num); | ||
1859 | item = msg->front.iov_base + msg->front.iov_len; | 1860 | item = msg->front.iov_base + msg->front.iov_len; |
1860 | item->ino = cpu_to_le64(cap->cap_ino); | 1861 | item->ino = cpu_to_le64(cap->cap_ino); |
1861 | item->cap_id = cpu_to_le64(cap->cap_id); | 1862 | item->cap_id = cpu_to_le64(cap->cap_id); |