Re: [PATCH for-next V6 1/5] IB/uverbs: Fix reference counting usage of event files

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

 



On Tue, Jun 30, 2015 at 01:26:03PM +0300, Yishai Hadas wrote:

> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
> Signed-off-by: Shachar Raindel <raindel@xxxxxxxxxxxx>

Reviewed-By: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>

>  err_file:
> +	ib_uverbs_free_async_event_file(file);
>  	fput(filp);

> +void ib_uverbs_free_async_event_file(struct ib_uverbs_file *file)
> +{
> +	kref_put(&file->async_file->ref, ib_uverbs_release_event_file);
> +	file->async_file = NULL;
> +}

Mm, I figured out why that looks so wonky - there is no locking on the
async_file assign. Other cases were relying on
ib_register_event_handler not succeeding for locking, this doesn't
have that luxury. The async_file usage looks really weird overall,
there may be something strange there. But - that seems like a job for
another day..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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