Commit 542ed81 1 parent b3a69c5 commit 542ed81 Copy full SHA for 542ed81
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -733,15 +733,18 @@ struct nft_set_ext_tmpl {
733
733
/**
734
734
* struct nft_set_ext - set extensions
735
735
*
736
- * @genmask: generation mask
736
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
737
737
* @offset: offsets of individual extension types
738
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.
739
742
*/
740
743
struct nft_set_ext {
741
744
u8 genmask ;
742
745
u8 offset [NFT_SET_EXT_NUM ];
743
746
char data [];
744
- };
747
+ } __aligned ( BITS_PER_LONG / 8 ) ;
745
748
746
749
static inline void nft_set_ext_prepare (struct nft_set_ext_tmpl * tmpl )
747
750
{
You can’t perform that action at this time.
0 commit comments