forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace one-element array flex-array member in fs/reiserfs/reiserfs.h #290
Labels
[Idiom] fake flexible array
[Linux] v6.6
Released in Linux kernel v6.6
[Refactor] 1-element array
Conversion away from one-element array
Comments
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Jun 21, 2023
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in direntry_uarea structure, and refactor the rest of the code, accordingly. Worth mentioning is that before these changes, the original implementation was returning two-too many bytes in function direntry_create_vi(): fs/reiserfs/item_ops.c:464: int size = sizeof(struct direntry_uarea); ... fs/reiserfs/item_ops.c-490- size += (dir_u->entry_count * sizeof(short)); ... fs/reiserfs/item_ops.c-517- return size; Link: KSPP#79 Link: KSPP#290 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
akiyks
pushed a commit
to akiyks/linux
that referenced
this issue
Jul 13, 2023
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in direntry_uarea structure, and refactor the rest of the code, accordingly. Worth mentioning is that before these changes, the original implementation was returning two-too many bytes in function direntry_create_vi(): fs/reiserfs/item_ops.c:464: int size = sizeof(struct direntry_uarea); ... fs/reiserfs/item_ops.c-490- size += (dir_u->entry_count * sizeof(short)); ... fs/reiserfs/item_ops.c-517- return size; Link: KSPP#79 Link: KSPP#290 Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
arinc9
pushed a commit
to arinc9/linux
that referenced
this issue
Jul 29, 2023
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in direntry_uarea structure, and refactor the rest of the code, accordingly. Worth mentioning is that before these changes, the original implementation was returning two-too many bytes in function direntry_create_vi(): fs/reiserfs/item_ops.c:464: int size = sizeof(struct direntry_uarea); ... fs/reiserfs/item_ops.c-490- size += (dir_u->entry_count * sizeof(short)); ... fs/reiserfs/item_ops.c-517- return size; Link: KSPP#79 Link: KSPP#290 Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Fixed in commit 76d2ced. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Idiom] fake flexible array
[Linux] v6.6
Released in Linux kernel v6.6
[Refactor] 1-element array
Conversion away from one-element array
The text was updated successfully, but these errors were encountered: