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 b3a69c5 commit 542ed81Copy full SHA for 542ed81
include/net/netfilter/nf_tables.h
@@ -733,15 +733,18 @@ struct nft_set_ext_tmpl {
733
/**
734
* struct nft_set_ext - set extensions
735
*
736
- * @genmask: generation mask
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
737
* @offset: offsets of individual extension types
738
* @data: beginning of extension data
739
+ *
740
+ * This structure must be aligned to word size, otherwise atomic bitops
741
+ * on genmask field can cause alignment failure on some archs.
742
*/
743
struct nft_set_ext {
744
u8 genmask;
745
u8 offset[NFT_SET_EXT_NUM];
746
char data[];
-};
747
+} __aligned(BITS_PER_LONG / 8);
748
749
static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl)
750
{
0 commit comments