xen: update PV-device interface headers
Update the Xen PV-device interface headers in order to avoid undefined behavior with flexible arrays being defined with one array element. Reported-by: Pry Mar <pryorm09@gmail.com> Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Link: https://lore.kernel.org/r/20231205115121.11627-1-jgross@suse.com Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
0dd3ee3112
commit
125c0a646a
|
@ -537,7 +537,7 @@ struct xendispl_dbuf_create_req {
|
|||
|
||||
struct xendispl_page_directory {
|
||||
grant_ref_t gref_dir_next_page;
|
||||
grant_ref_t gref[1]; /* Variable length */
|
||||
grant_ref_t gref[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -95,7 +95,7 @@ struct __name##_sring { \
|
|||
RING_IDX req_prod, req_event; \
|
||||
RING_IDX rsp_prod, rsp_event; \
|
||||
uint8_t __pad[48]; \
|
||||
union __name##_sring_entry ring[1]; /* variable-length */ \
|
||||
union __name##_sring_entry ring[]; \
|
||||
}; \
|
||||
\
|
||||
/* "Front" end's private variables */ \
|
||||
|
|
|
@ -659,7 +659,7 @@ struct xensnd_open_req {
|
|||
|
||||
struct xensnd_page_directory {
|
||||
grant_ref_t gref_dir_next_page;
|
||||
grant_ref_t gref[1]; /* Variable length */
|
||||
grant_ref_t gref[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue