We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9b344a commit 4f49349Copy full SHA for 4f49349
include/net/netfilter/nf_tables.h
@@ -721,15 +721,18 @@ struct nft_set_ext_tmpl {
721
/**
722
* struct nft_set_ext - set extensions
723
*
724
- * @genmask: generation mask
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
725
* @offset: offsets of individual extension types
726
* @data: beginning of extension data
727
+ *
728
+ * This structure must be aligned to word size, otherwise atomic bitops
729
+ * on genmask field can cause alignment failure on some archs.
730
*/
731
struct nft_set_ext {
732
u8 genmask;
733
u8 offset[NFT_SET_EXT_NUM];
734
char data[];
-};
735
+} __aligned(BITS_PER_LONG / 8);
736
737
static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl)
738
{
0 commit comments