mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 13:09:04 -04:00
msm: adsprpc: Avoid taking reference for group_info
Currently, the get_current_groups API accesses group info, which
increases the usage refcount. If the IOCTL using the
get_current_groups API is called many times, the usage counter
overflows. To avoid this, access group info without taking a
reference. A reference is not required as group info is not
released during the IOCTL call.
Change-Id: Ib4de80cac8b36f73d8f5c6dd9824722153189285
Signed-off-by: ANANDU KRISHNAN E <quic_anane@quicinc.com>
(cherry picked from commit de9f4fe6f8)
This commit is contained in:
parent
d9122fed27
commit
762e2f518a
1 changed files with 1 additions and 1 deletions
|
|
@ -5806,7 +5806,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
|
|||
|
||||
static int fastrpc_get_process_gids(struct gid_list *gidlist)
|
||||
{
|
||||
struct group_info *group_info = get_current_groups();
|
||||
struct group_info *group_info = current_cred()->group_info;
|
||||
int i = 0, err = 0, num_gids = group_info->ngroups + 1;
|
||||
unsigned int *gids = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue