Re: [PATCH 11/18] rpmsg: glink: Use the local intents when receiving data
From: Sricharan R
Date: Tue Aug 22 2017 - 08:39:12 EST
Hi,
<snip..>
>> Â -ÂÂÂ /* Might have an ongoing, fragmented, message to append */
>> -ÂÂÂ if (!channel->buf) {
>> -ÂÂÂÂÂÂÂ channel->buf = kmalloc(chunk_size + left_size, GFP_ATOMIC);
>> -ÂÂÂÂÂÂÂ if (!channel->buf)
>> -ÂÂÂÂÂÂÂÂÂÂÂ return -ENOMEM;
>> +ÂÂÂ if (glink->intentless) {
>> +ÂÂÂÂÂÂÂ /* Might have an ongoing, fragmented, message to append */
>> +ÂÂÂÂÂÂÂ if (!channel->buf) {
>> +ÂÂÂÂÂÂÂÂÂÂÂ intent = kzalloc(sizeof(*intent), GFP_ATOMIC);
>> +ÂÂÂÂÂÂÂÂÂÂÂ if (!intent)
>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ return -ENOMEM;
>> +
>> +ÂÂÂÂÂÂÂÂÂÂÂ intent->data = kmalloc(chunk_size + left_size,
>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ GFP_ATOMIC);
>
> Who is supposed to free the intent and intent->data memory ?
Well, that's done as a part of the rx_done_work.
Regards,
Sricharan
--
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus