lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/10] Fix reference counting for rxe tasklets
On Mon, Jul 22, 2019 at 05:14:21PM +0200, Maksym Planeta wrote:
>
> int rxe_init_task(void *obj, struct rxe_task *task,
> - void *arg, int (*func)(void *), char *name)
> + struct rxe_qp *qp, int (*func)(void *), char *name)
> {
> task->obj = obj;
> - task->arg = arg;
> + task->arg = qp;
> task->func = func;
> snprintf(task->name, sizeof(task->name), "%s", name);
> task->destroyed = false;
>
> + rxe_add_ref(&qp->pelem);

Please put the kref incrs near the copy of the pointer. Those things
are logically related - copy the pointer, incr the kref.

Jason

\
 
 \ /
  Last update: 2019-07-22 17:27    [W:1.099 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site