mbox series

[v2,0/5] misc: fastrpc: few fixes

Message ID 20190829092926.12037-1-srinivas.kandagatla@linaro.org
Headers show
Series misc: fastrpc: few fixes | expand

Message

Srinivas Kandagatla Aug. 29, 2019, 9:29 a.m. UTC
Hi Greg,

More testing on fastprc revealed few memory leaks in driver
and few corner cases.
These patches are the fixes for those cases.
One patch from Jorge is to remove unsed definition.

co-authorship issue on
"misc: fastrpc: fix double refcounting on dmabuf"
patch has been resolved offline and decided to not
change anything.

Thanks,
srini

Changes since v1:
 - Updated change log to remove TEST tag.
 - no code changes.

Bjorn Andersson (2):
  misc: fastrpc: Reference count channel context
  misc: fastrpc: Don't reference rpmsg_device after remove

Jorge Ramirez-Ortiz (1):
  misc: fastrpc: remove unused definition

Srinivas Kandagatla (2):
  misc: fastrpc: fix double refcounting on dmabuf
  misc: fastrpc: free dma buf scatter list

 drivers/misc/fastrpc.c | 74 ++++++++++++++++++++++++------------------
 1 file changed, 43 insertions(+), 31 deletions(-)

-- 
2.21.0

Comments

Stephen Boyd Sept. 5, 2019, 5:11 a.m. UTC | #1
Quoting Srinivas Kandagatla (2019-08-29 02:29:26)
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c

> index eee2bb398947..47ae84afac2e 100644

> --- a/drivers/misc/fastrpc.c

> +++ b/drivers/misc/fastrpc.c

> @@ -550,6 +550,7 @@ static void fastrpc_dma_buf_detatch(struct dma_buf *dmabuf,


Is the function really called buf_detatch? Is it supposed to be
buf_detach?

>         mutex_lock(&buffer->lock);

>         list_del(&a->node);

>         mutex_unlock(&buffer->lock);

> +       sg_free_table(&a->sgt);

>         kfree(a);
Srinivas Kandagatla Sept. 5, 2019, 8:15 a.m. UTC | #2
On 05/09/2019 06:11, Stephen Boyd wrote:
> Quoting Srinivas Kandagatla (2019-08-29 02:29:26)

>> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c

>> index eee2bb398947..47ae84afac2e 100644

>> --- a/drivers/misc/fastrpc.c

>> +++ b/drivers/misc/fastrpc.c

>> @@ -550,6 +550,7 @@ static void fastrpc_dma_buf_detatch(struct dma_buf *dmabuf,

> 

> Is the function really called buf_detatch? Is it supposed to be

> buf_detach?


Thanks Stephen, for you keen observation on the spelling, I will send a 
patch to fix that!

Looks like I inherited that from drivers/staging/android/ion/ion.c

--srini

> 

>>          mutex_lock(&buffer->lock);

>>          list_del(&a->node);

>>          mutex_unlock(&buffer->lock);

>> +       sg_free_table(&a->sgt);

>>          kfree(a);