diff options
| author | 2021-04-29 21:45:19 +0200 | |
|---|---|---|
| committer | 2021-04-29 21:45:19 +0200 | |
| commit | e50fedec822efc7b7090f95862b782d91ca8aec0 (patch) | |
| tree | 22dd6b534d00a1f7fc3823f0d88e0d43547fc87b /kernel/groups.c | |
| parent | Merge branch 'for-5.13/plantronics' into for-linus (diff) | |
| parent | HID: surface-hid: Add support for legacy keyboard interface (diff) | |
Merge branch 'for-5.13/surface-system-aggregator-intergration' into for-linus
- Surface Aggregator Module support from Maximilian Luz
Diffstat (limited to 'kernel/groups.c')
| -rw-r--r-- | kernel/groups.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/groups.c b/kernel/groups.c index fe7e6385530e..787b381c7c00 100644 --- a/kernel/groups.c +++ b/kernel/groups.c @@ -15,12 +15,7 @@ struct group_info *groups_alloc(int gidsetsize) { struct group_info *gi; - unsigned int len; - - len = sizeof(struct group_info) + sizeof(kgid_t) * gidsetsize; - gi = kmalloc(len, GFP_KERNEL_ACCOUNT|__GFP_NOWARN|__GFP_NORETRY); - if (!gi) - gi = __vmalloc(len, GFP_KERNEL_ACCOUNT); + gi = kvmalloc(struct_size(gi, gid, gidsetsize), GFP_KERNEL_ACCOUNT); if (!gi) return NULL; |
