Re: [PATCH 05/10] Fix reference counting for rxe tasklets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux