Skip to content

Commit e37a51a

Browse files
thieule742igaw
authored andcommitted
types: Fix nvme_ns_id_desc packing
The namespace identifier length (nidl) field can be any length which could potentially lead to unaligned access. Signed-off-by: Thieu Le <[email protected]>
1 parent 9562713 commit e37a51a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,7 @@ struct nvme_ns_id_desc {
29552955
__u8 nidl;
29562956
__le16 rsvd;
29572957
__u8 nid[];
2958-
};
2958+
} __attribute__((packed));
29592959

29602960
/**
29612961
* enum nvme_ns_id_desc_nidt - Known namespace identifier types

0 commit comments

Comments
 (0)