Skip to content

Commit 6d9406f

Browse files
iii-iAlexander Gordeev
authored andcommitted
s390/uapi: cover statfs padding by growing f_spare
pahole says: struct compat_statfs64 { ... u32 f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ struct statfs { ... unsigned int f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ struct statfs64 { ... unsigned int f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ One has to keep the existence of padding in mind when working with these structs. Grow f_spare arrays to 5 in order to simplify things. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Ilya Leoshkevich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexander Gordeev <[email protected]>
1 parent ed40866 commit 6d9406f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/s390/include/asm/compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct compat_statfs64 {
112112
u32 f_namelen;
113113
u32 f_frsize;
114114
u32 f_flags;
115-
u32 f_spare[4];
115+
u32 f_spare[5];
116116
};
117117

118118
/*

arch/s390/include/uapi/asm/statfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct statfs {
3030
unsigned int f_namelen;
3131
unsigned int f_frsize;
3232
unsigned int f_flags;
33-
unsigned int f_spare[4];
33+
unsigned int f_spare[5];
3434
};
3535

3636
struct statfs64 {
@@ -45,7 +45,7 @@ struct statfs64 {
4545
unsigned int f_namelen;
4646
unsigned int f_frsize;
4747
unsigned int f_flags;
48-
unsigned int f_spare[4];
48+
unsigned int f_spare[5];
4949
};
5050

5151
#endif

0 commit comments

Comments
 (0)