[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190722152700.GE7607@ziepe.ca>
Date: Mon, 22 Jul 2019 12:27:00 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Maksym Planeta <mplaneta@...inf.tu-dresden.de>
Cc: Moni Shoua <monis@...lanox.com>,
Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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
Powered by blists - more mailing lists