Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcf3f804 authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian
Browse files

soc: qcom: rpm: Change driver memory allocation to use GFP_NOFS



When a filesystem driver calls into  makes a RPM request, RPM driver
makes a kzalloc request with GFP_KERNEL flag. This results in a deadlock
if a driver waiting on IO completion sends a RPM message.

Change memory allocation in the RPM driver to use GFP_NOFS.

Change-Id: Ic10b4d45ee9097c419d39b48b3aef6d3b41045e6
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent ad9fe5a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -82,7 +82,7 @@ static struct glink_apps_rpm_data *glink_data;
#define DEFAULT_BUFFER_SIZE 256
#define DEBUG_PRINT_BUFFER_SIZE 512
#define MAX_SLEEP_BUFFER 128
#define GFP_FLAG(noirq) (noirq ? GFP_ATOMIC : GFP_KERNEL)
#define GFP_FLAG(noirq) (noirq ? GFP_ATOMIC : GFP_NOFS)
#define INV_RSC "resource does not exist"
#define ERR "err\0"
#define MAX_ERR_BUFFER_SIZE 128