lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 11/18] rpmsg: glink: Use the local intents when receiving data
From
Date
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

\
 
 \ /
  Last update: 2017-08-22 14:40    [W:0.075 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site