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 aebfce1 commit dda1d24Copy full SHA for dda1d24
include/net/netfilter/nf_tables.h
@@ -690,15 +690,18 @@ struct nft_set_ext_tmpl {
690
/**
691
* struct nft_set_ext - set extensions
692
*
693
- * @genmask: generation mask
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
694
* @offset: offsets of individual extension types
695
* @data: beginning of extension data
696
+ *
697
+ * This structure must be aligned to word size, otherwise atomic bitops
698
+ * on genmask field can cause alignment failure on some archs.
699
*/
700
struct nft_set_ext {
701
u8 genmask;
702
u8 offset[NFT_SET_EXT_NUM];
703
char data[];
-};
704
+} __aligned(BITS_PER_LONG / 8);
705
706
static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl)
707
{
0 commit comments