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: Iec31c90f9fd1a837fb697d5d7d1baba7d285374d Signed-off-by: ANANDU KRISHNAN E <quic_anane@quicinc.com>
This commit is contained in:
parent
3c7891e07a
commit
99c2a35413
@ -6551,7 +6551,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 New Issue
Block a user