diff options
author | Jeff Layton | 2019-05-06 15:38:47 +0200 |
---|---|---|
committer | Ilya Dryomov | 2019-05-07 19:43:05 +0200 |
commit | b726ec972cf2122137fbc47847b4fcc7b3bc2801 (patch) | |
tree | cb991782dce8513dbbcf66c2cdcbb2681ec53d58 /include/linux/ceph | |
parent | libceph: fix unaligned accesses in ceph_entity_addr handling (diff) | |
download | kernel-qcow2-linux-b726ec972cf2122137fbc47847b4fcc7b3bc2801.tar.gz kernel-qcow2-linux-b726ec972cf2122137fbc47847b4fcc7b3bc2801.tar.xz kernel-qcow2-linux-b726ec972cf2122137fbc47847b4fcc7b3bc2801.zip |
libceph: make ceph_pr_addr take an struct ceph_entity_addr pointer
GCC9 is throwing a lot of warnings about unaligned accesses by
callers of ceph_pr_addr. All of the current callers are passing a
pointer to the sockaddr inside struct ceph_entity_addr.
Fix it to take a pointer to a struct ceph_entity_addr instead,
and then have the function make a copy of the sockaddr before
printing it.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/messenger.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 800a2128d411..23895d178149 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h @@ -323,7 +323,8 @@ struct ceph_connection { }; -extern const char *ceph_pr_addr(const struct sockaddr_storage *ss); +extern const char *ceph_pr_addr(const struct ceph_entity_addr *addr); + extern int ceph_parse_ips(const char *c, const char *end, struct ceph_entity_addr *addr, int max_count, int *count); |